Powershell script to find and delete orphaned users in SharePoint
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) #Functions to Imitate SharePoint 2010 Cmdlets in MOSS 2007 function global:Get-SPWebApplication($WebAppURL) { return [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($WebAppURL) } function global:Get-SPSite($url) { return new-Object Microsoft.SharePoint.SPSite($url) } function global:Get-SPWeb($url) { $site= New-Object Microsoft.SharePoint.SPSite($url) if($site -ne $null) { $web=$site.OpenWeb(); } return $web } #Function to Check if an User exists in AD function CheckUserExistsInAD() { Param( [Parameter(Mandatory=$true)] [string]$UserLoginID ) … Continue reading Powershell script to find and delete orphaned users in SharePoint
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed