Avatar of Anthony K O365
Anthony K O365
Flag 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.
Powershell

Avatar of undefined
Last Comment
SubSun

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Neil Russell

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Anthony K O365

ASKER
The DG is already mail-enabled.
SubSun

Is it a Universal group? If it's not working you can try with a Mail-Enabled Universal Distribution Group..
Anthony K O365

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!!
Your help has saved me hundreds of hours of internet surfing.
fblack61
Anthony K O365

ASKER
Yes it is USG.
SubSun

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?