Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am trying to take a BackUp of a Site Collection from a remote computer, but I am getting a error that i am not sure of the script is:
Invoke-Command -ComputerName remotecomputername -ScriptBlock {Backup-SPSite -Identity "http://remotecomputername:8080" -Path "C:\Users\username\Documents\SiteBackUp\BackUp8080"} -credential username

the error is get is :
The term 'Backup-SPSite' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the sp
elling of the name, or if a path was included, verify that the path is correct and try again.
    + CategoryInfo          : ObjectNotFound: (Backup-SPSite:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Regards,
Vikram
Posted
Updated 26-Mar-13 8:17am
v3

1 solution

I am not a big SharePoint guru, but I think you can't do this directly.
1) You have to enable PSRemoting: http://technet.microsoft.com/en-us/library/hh849694.aspx[^]
2) Than enter remote session: http://technet.microsoft.com/en-us/library/hh849707.aspx[^] or import remote session: http://technet.microsoft.com/en-us/library/hh849970.aspx[^]. See this article: http://technet.microsoft.com/en-us/library/gg550867(v=office.14).aspx[^] and search for Backup-SPSite.
Other link you might find interesting: http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/20/get-started-managing-sharepoint-2010-with-powershell-cmdlets.aspx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900