我想从 CSV 文件导入批量缩放。
The csv file format: name,email,capacity
我使用以下脚本创建房间:
$roomlist = import-csv roomlist.csv
foreach($room in $roomlist){
New-Mailbox -Alias $room.email -Database MBX01 -Name $room.name -OrganizationalUnit “Domain/Users” -ResourceCapacity $room.capacity -room
Set-mailboxfolderpermission -identity "${room.name}:\Calendar" -AccessRights Reviewer -User Default
}
创建缩放成功,但设置邮箱文件夹权限失败。我该如何修复?
答案1
修改此行:
Set-mailboxfolderpermission -identity "${room.name}:\Calendar" -AccessRights Reviewer -User Default
到:
Set-mailboxfolderpermission -identity "$($room.name):\Calendar" -AccessRights Reviewer -User default
看看是否有帮助。