First create a PowerShell script in Notepad:
Backup-SPSite -Identity http://wss-08r2 -Path "\\servername\sharepoint2010\one\wss-08r2.bak" -Force
name the file - backup.ps1
Second:
Under folder C:\Windows\System32\WindowsPowerShell\v1.0 create profile.ps1 file it will be default profile for all users on the SharePoint front end server, edit the file by adding -
Under folder C:\Windows\System32\WindowsPowerShell\v1.0 create profile.ps1 file it will be default profile for all users on the SharePoint front end server, edit the file by adding -
Add-PSSnapin Microsoft.SharePoint.PowerShell
And save the file.Third:
Create a scheduled job and in Action tab put:
Action: powershell.exe
Add arguments: -command "PATH\backup.ps1"
where is PATH - path to the script file.
No comments:
Post a Comment