Skip to content

Instantly share code, notes, and snippets.

View imamkhaira's full-sized avatar

Imam Khaira imamkhaira

  • Earth
View GitHub Profile
@imamkhaira
imamkhaira / spbackup.ps1
Created March 22, 2021 16:47
sharepoint-backup
Add-PsSnapin Microsoft.SharePoint.PowerShell
Set-Location $home
$subdomains = "epesb", "epehr"
# CHANGE TTHE VARIABLE BELOW To AN APPROPRIATE BACKUP LOCATION.
$backupdir = "C:\Users\SPFarm\Desktop"
New-Item -Path $backupdir -ItemType directory
ForEach ($subdomain in $subdomains) {