To get the snap in loaded you'll need to add the snap-in in your
PowerShell ISE profile. Here's a quick script to get this done from
within the ISE, just type this in the ISE command window:
Run the commands then close and open the ISE. You now should have
the SharePoint snapin loaded and you should get the friendly auto
complete functionality you're used to in the SharePoint PowerShell
command window.
if (!(test-path $profile )) { new-item -type file -path $profile -force } $cmd = 'if((Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) { Add-PSSnapIn "Microsoft.SharePoint.Powershell" }' out-file -FilePath $profile -InputObject $cmd -Append
No comments:
Post a Comment