Anthony K O365
asked on
Powershell Question--Add security group to Room Resources
I'm running the following script...
foreach($room in import-csv rooms.csv){
$BIP = (Get-CalendarProcessing $room.Name).Bookinpolicy
$BIP += UserName
Set-CalendarProcessing $room.Name -Bookinpolicy $BIP
}
However, when I use a security group name in the "UserName" section I get an error 'User does not exist'. I simply want to add security group to the BookInPolicy section of a list of Rooms instead of list of users.
Note: I created a DG and used -type Security. The security group works in other areas.
foreach($room in import-csv rooms.csv){
$BIP = (Get-CalendarProcessing $room.Name).Bookinpolicy
$BIP += UserName
Set-CalendarProcessing $room.Name -Bookinpolicy $BIP
}
However, when I use a security group name in the "UserName" section I get an error 'User does not exist'. I simply want to add security group to the BookInPolicy section of a list of Rooms instead of list of users.
Note: I created a DG and used -type Security. The security group works in other areas.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is it a Universal group? If it's not working you can try with a Mail-Enabled Universal Distribution Group..
ASKER
Neilsr is correct. The security group must be mail enabled to work. While it was already mail enabled upon creation, it will not work with this particular script, but it will work elsewhere.
Thanks!!
Thanks!!
ASKER
Yes it is USG.
The security group must be mail enabled to work. While it was already mail enabled upon creation, it will not work with this particular script, but it will work elsewhere.I don't think that's true.. if it's working then it should work for all mail enabled security groups, it doesn't matter when it is mail enabled.
My guess is, it only work with Mail-Enabled Universal Distribution Group, did you try it?
ASKER