Powershell Question--Add security group to Room Resources

Anthony K O365
Anthony K O365 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Development Lead
Commented:
It MUST be a mail enabled security group.
Anthony K O365Messaging Consulting

Author

Commented:
The DG is already mail-enabled.
Subash SundharanIT Infrastructure Architect

Commented:
Is it a Universal group? If it's not working you can try with a Mail-Enabled Universal Distribution Group..
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Anthony K O365Messaging Consulting

Author

Commented:
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!!
Anthony K O365Messaging Consulting

Author

Commented:
Yes it is USG.
Subash SundharanIT Infrastructure Architect

Commented:
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?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial