Link to home
Start Free TrialLog in
Avatar of Anthony K O365
Anthony K O365Flag for United States of America

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.
ASKER CERTIFIED SOLUTION
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony K O365

ASKER

The DG is already mail-enabled.
Avatar of SubSun
Is it a Universal group? If it's not working you can try with a Mail-Enabled Universal Distribution Group..
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!!
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?