Running PowerShell on MOSS 2007
- If you are running MOSS 2007 on Windows Server 2003 the you have to download and install PowerShell from https://support.microsoft.com/kb/968930. Windows Server 2008 natively supports PowerShell.
- Set the Execution Policy to 'RemoteSigned'. You can check it by running 'Get-ExecutionPolicy' cmdlet
The default execution policy for PowerShell is “Restricted” (commands only, not scripts)
# All scripts running locally are allowed
Set-ExecutionPolicy RemoteSigned
This means downloaded scripts must be signed by a trusted publisher before they can be run.
3. You need to load the SharePoint assemblies with the following command
# Load the SharePoint assemblies
[Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
A bunch of PowerShell scripts are available at https://www.powershell.nu/2009/09/08/moss-2007-script-collection
Comments
- Anonymous
January 01, 2003
Thanks - Anonymous
August 20, 2014
The comment has been removed - Anonymous
February 18, 2015
We can mimic SharePoint 2010/2013 PowerShell cmdlets in MOSS 2007 by creating our own functions as in:http://www.sharepointdiary.com/2011/05/how-to-use-powershell-with-sharepoint-2007.html - Anonymous
February 23, 2015
Information was good, I like your post.
Looking forward for more on this topic.
http://staygreenacademy.com">SharePoint 2013 Development training Online - Anonymous
February 23, 2015
I absolutely love your blog and find nearly all of your post’s to be precisely what I’m looking for.
http://khalil-kothia.com">SharePoint freelancer