July 2018
Beginner
552 pages
13h 18m
English
Now we will take a look at some frequently used cmdlets. The first important cmdlets are the ones for retrieving the permissions:
#Gathering cmdlets and its needed management roles$modulesWithManagementRolesNeeded = Get-Command -Module ($returnedInformation.Name) | Select-Object Name, @{Name = "ManagementRole"; Expression = {Get-ManagementRole -Cmdlet ($_.Name)}} -First 2 #just gathering the first 2 cmdlets as example
This example also shows how to create dynamic properties, in which the management roles are gathered automatically for the first two cmdlets (limited because of the long execution time):
#Gathering for all unique roles the role assignee types and the role assignee names($modulesWithManagementRolesNeeded.ManagementRole).Name ...
Read now
Unlock full access