Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| qnd:sharepoint [2021/10/13 20:05] – mgupton | qnd:sharepoint [2022/11/04 13:34] (current) – mgupton | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Sharepoint ====== | ====== Sharepoint ====== | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | |||
| + | ====== Sharepoint Migration Tool/SPMT Report Packer ====== | ||
| + | * #powershell | ||
| + | * Report folder: '' | ||
| + | |||
| + | This is a quick-n-dirty script to collect all the reports from SPMT and package it up as a ZIP archive. The script is designed to be ran in the root of the SPMT report folder, '' | ||
| + | <code powershell> | ||
| + | $jobs = @{} | ||
| + | |||
| + | ls | foreach { | ||
| + | |||
| + | $rpt = " | ||
| + | $summary = import-csv " | ||
| + | $id = split-path -leaf $_ | ||
| + | |||
| + | $summary | foreach { | ||
| + | $lastrun = $_.{Start time} | ||
| + | $lastrun = [datetime]:: | ||
| + | $sitename = split-path -leaf $_.Source | ||
| + | |||
| + | $job = [PSCustomObject]@{ | ||
| + | id = $id | ||
| + | sitename = $sitename | ||
| + | src = $_.Source | ||
| + | rpt = $rpt | ||
| + | lastrun = $lastrun | ||
| + | } | ||
| + | |||
| + | if ($jobs.Keys -notcontains $job.src) { | ||
| + | $jobs[$job.src] = $job | ||
| + | |||
| + | } | ||
| + | else { | ||
| + | if ($job.lastrun -gt $jobs[$job.src].lastrun) { | ||
| + | $jobs[$job.src] = $job | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | | ||
| + | $job = $job | select -ExpandProperty value | ||
| + | write-host " | ||
| + | Compress-Archive -Path $job.rpt -DestinationPath " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====== Sharepoint Online ====== | ||
| + | ===== Assorted Things ===== | ||
| + | * One way to prevent a redirect (on pages that auto-redirect) if you need to get to the page is to add the stay=true URL parameter to the end of the site URL. | ||
| + | |||
| + | ===== Deleting Redirect URL ===== | ||
| + | When a site is renamed the redirect URL needs to be deleted if you want to create a new site with the name previously used by the renamed site. | ||
| + | <code powershell> | ||
| + | # List all redirect URLs | ||
| + | Get-SPOSite -Template REDIRECTSITE# | ||
| + | |||
| + | # Delete a redirect URL | ||
| + | Remove-SPOSite -Identity < | ||
| + | </ | ||
| + | |||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | ===== Some Handy Management Commands ===== | ||
| + | * [[https:// | ||
| + | |||