Skip to content

Instantly share code, notes, and snippets.

@joerodgers
Created November 22, 2019 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joerodgers/4c7f4ea529dc6ea552da35d0e25be846 to your computer and use it in GitHub Desktop.
Save joerodgers/4c7f4ea529dc6ea552da35d0e25be846 to your computer and use it in GitHub Desktop.
Reports sandbox solution references in the farm.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
$sites = Get-SPSite -Limit All | ? IsReadLocked -eq $false
$results = @()
foreach( $site in $sites )
{
$solutions = @($site | Get-SPUserSolution)
if( $solutions.Count -gt 0 )
{
foreach( $solution in $solutions )
{
$results += [PSCUstomObject] @{
Site = $site.Url
Name = $solution.Name
Status = $solution.Status
HasAssemblies = $solution.HasAssemblies
}
}
}
}
$results | Export-Csv -Path "SandboxSolutions.csv" -NoTypeInformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment