Article
SharePoint Online - Setting up PowerShell
Install the prerequisites and the SharePoint Online Management Shell, then connect to your tenant.
1 min read#Office#PowerShell#SharePoint
Tag
Install the prerequisites and the SharePoint Online Management Shell, then connect to your tenant.
A PowerShell script that empties a SharePoint 2010 document library by deleting its files and then its folders.
Add-PSSnapin Microsoft.SharePoint.PowerShell
# Replace siteurl with actual web url
$web = Get-SPWeb -Identity "siteurl"
# Replace docurl with document library url
$list = $web.GetList("docurl")Fix a SharePoint 2010 solution deployment stuck on Deploying by restarting the admin service and running the pending admin jobs.
stsadm -o execadmsvcjobsA PowerShell script that finds every user in Active Directory, adds them to a SharePoint 2010 group and syncs their profile details.
$spgroupname = "Group Name"
$sitename = "http://sitename"
$domain = $env:USERDOMAIN
$spsite = New-Object Microsoft.SharePoint.SPSite($sitename)
$rootweb = $spsite.RootWebPowerShell script to create the Word Automation Services service application in SharePoint 2010.
$serviceName = "Word Automation Service"
$appPool = $null
Add-PSSnapin Microsoft.SharePoint.PowerShell
$appPool = Get-SPIisWebServiceApplicationPool -Identity <appPoolName>
if ($appPool -eq $null)