First requirement - limiting access to PowerShell commands

As we reviewed in a previous section, out-of-office settings are managed by just two commands:

Get-Command *MailboxAutoReply* | select NameName ---- Get-MailboxAutoReplyConfigurationSet-MailboxAutoReplyConfiguration

To limit access to just these commands, we need to identify a role that includes them as a starting point for our new role. To identify the role, we will search for role entries that include either of these commands. We rely on the Get-ManagementRoleEntry command with a wildcard to include all applicable entries. To keep the results simple, we used a unique filter, but we had to make sure both the Get and Set verbs are included.

Get-ManagementRoleEntry *\*MailboxAutoReplyConfiguration ...

Get PowerShell for Office 365 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.