Created
June 10, 2013 15:11
-
-
Save janikvonrotz/5749524 to your computer and use it in GitHub Desktop.
PowerShell: Load modules and snapins
#PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import all mdoules | |
Get-Module -ListAvailable | Import-Module | |
# show module commands | |
Get-Command –Module grouppolicy | |
#--------------------------------------------------# | |
# SharePoint | |
#--------------------------------------------------# | |
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"} | |
#--------------------------------------------------# | |
# SqlServer | |
#--------------------------------------------------# | |
if((Get-PSSnapin SqlServerCmdletSnapin100 -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin SqlServerCmdletSnapin100} | |
if((Get-PSSnapin SqlServerProviderSnapin100 -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin SqlServerProviderSnapin100} | |
#--------------------------------------------------# | |
# Quest ActiveDirectory | |
#--------------------------------------------------# | |
Import-Module Quest.ActiveRoles.ArsPowerShellSnapIn | |
#--------------------------------------------------# | |
# ActiveDirectory | |
#--------------------------------------------------# | |
Import-Module ActiveDirectory | |
#--------------------------------------------------# | |
# Windows Server Manager | |
#--------------------------------------------------# | |
Import-Module ServerManager | |
#--------------------------------------------------# | |
# Windows Server GroupPolicy | |
#--------------------------------------------------# | |
Import-Module GroupPolicy | |
#--------------------------------------------------# | |
# VMware vSphere PowerCLI | |
#--------------------------------------------------# | |
if((Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin VMware.VimAutomation.Core} | |
if((Get-PSSnapin VMware.VimAutomation.Vds -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin VMware.VimAutomation.Vds} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment