Load SharePoint PS Module (if not already loaded)
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
#Load SharePoint PS Module (if not already loaded) | |
$ver = $host | select version | |
if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} | |
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) | |
{ | |
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment