How To Install The SharePoint PowerShell Snapin Posted on by Webmaster IT Support Forum › Forums › Website Development › DMS › SharePoint › Troubleshooting › How To Install The SharePoint PowerShell Snapin Tagged: PowerShell, Snapin This topic has 1 reply, 1 voice, and was last updated 9 years, 4 months ago by Webmaster. Viewing 1 reply thread Author Posts August 4, 2014 at 1:48 pm #652 WebmasterKeymaster Every time I want to user PowerShell to Do SharePoint commandlets, I have to install the snapin. How can I install the SharePoint PowerShell snapin automatically? August 4, 2014 at 1:52 pm #653 WebmasterKeymaster Apparently there are a number of ways to do this: A shortcut to %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit add-pssnapin microsoft.sharepoint.powershell Putting Add-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue at the start of any SharePoint PowerShell scripts Creating a PowerShell profile using the commandlet: if (!(test-path $profile.AllUsersAllHosts)) {new-item -type file -path $profile.AllUsersAllHosts -force} powershell_ise $profile.AllUsersAllHosts Then adding the following code to the start of your script: $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” } Author Posts Viewing 1 reply thread You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In