Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Powershell Question--Add security group to Room Resources

Posted on 2012-12-28
6
Medium Priority
?
1,700 Views
Last Modified: 2012-12-28
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.
0
Comment
Question by:Anthony K O365
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 37

Accepted Solution

by:
Neil Russell earned 1500 total points
ID: 38727324
It MUST be a mail enabled security group.
0
 

Author Comment

by:Anthony K O365
ID: 38727397
The DG is already mail-enabled.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38727933
Is it a Universal group? If it's not working you can try with a Mail-Enabled Universal Distribution Group..
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Closing Comment

by:Anthony K O365
ID: 38727934
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!!
0
 

Author Comment

by:Anthony K O365
ID: 38727941
Yes it is USG.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38727946
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?
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A brief introduction to what I consider to be the best editor for PowerShell.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question