Quickly load PowerShell (Snap-ins) modules
Most Microsoft products come with a Management Shell which is just PowerShell with their module loaded. What if you need access to an Active Directory cmdlet within the SharePoint Management Shell? Easy enough. Load the Active Directory snap-in and your script can use commands from both.
Here's the alias for the Add-PSSnapin cmdlet: asnp
Easy to remember, right?
The syntax and remembering all the names of the snap-ins is cumbersome so I shortcut it:
PS C:\USERS\Greg> asnp *sh*
This loads the SharePoint snap-in in the least number of keystrokes
Here are some others:
Here's the alias for the Add-PSSnapin cmdlet: asnp
Easy to remember, right?
The syntax and remembering all the names of the snap-ins is cumbersome so I shortcut it:
PS C:\USERS\Greg> asnp *sh*
This loads the SharePoint snap-in in the least number of keystrokes
Here are some others:
- asnp *acti* (Active Directory)
- asnp *serve* (Server Manager/Server Core modules)
- asnp *sh* (SharePoint modules)
Comments