This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory = $true)] | |
[string] $domain | |
) | |
$adminSiteURL = "https://$domain-Admin.SharePoint.com" | |
$TenantURL = "https://$domain.sharepoint.com" | |
$dateTime = "_{0:MM_dd_yy}_{0:HH_mm_ss}" -f (Get-Date) | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory = $true)] | |
[string] $domain | |
) | |
Clear-Host | |
$properties=@{SiteUrl='';SiteTitle='';ListTitle='';SensitivityLabel='';Type='';RelativeUrl='';ParentGroup='';MemberType='';MemberName='';MemberLoginName='';Roles='';}; | |
$adminSiteURL = "https://$domain-Admin.SharePoint.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory)] | |
[string]$SiteUrl | |
) | |
if(!$siteUrl) | |
{ | |
$siteUrl = Read-Host -Prompt "Enter the site collection"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Parameters | |
$tenantUrl = Read-Host -Prompt "Enter tenant collection URL"; | |
$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
$fileName = "SharedLinks-PnP" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Try { | |
$AdminCenterURL="https://contoso-admin.sharepoint.com/" | |
$SiteURL = "https://contoso.sharepoint.com/sites/test" | |
#Connect to SharePoint admin site | |
Connect-PnPOnline -Url $AdminCenterURL -Interactive | |
#Get the SharePoint Online site | |
$Site = Get-PnPTenantSite -Identity $SiteURL -errorAction Ignore | |
#Delete the Office 365 Group | |
Remove-PnPMicrosoft365Group -Identity $Site.GroupId -errorAction Ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory)] | |
[ValidateSet('Yes','No')] | |
[string]$ExcludeDirectSharingLink, | |
[Parameter(Mandatory)] | |
[ValidateSet('Yes','No')] | |
[string]$DeleteSharingink, | |
[Parameter(Mandatory)] | |
[string]$SiteUrl | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SiteUrl = Read-Host "Enter site collection URL" | |
$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
$fileName = "storageMetrics" + $dateTime + ".csv" | |
$outputPath = $directorypath + "\"+ $fileName | |
# Create storageMetrics.csv if not present | |
if (-not (Test-Path $outputPath)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Parameters | |
$IsSite=$true | |
#$tenantUrl = Read-Host -Prompt "Enter tenant collection URL"; | |
$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
$fileName = "SharedLinks-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
#Connect to PnP Online |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Parameters | |
$tenantUrl = Read-Host -Prompt "Enter tenant URL"; | |
$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
$fileName = "EffectivePermissionsReport-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
$userName = Read-Host -Prompt "Enter User Name"; | |
#Connect to PnP Online | |
Connect-PnPOnline -Url $tenantUrl -Interactive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Parameters | |
$SiteURL="https://contosoonline-admin.sharepoint.com/" | |
$dateTime = (Get-Date).toString("dd-MM-yyyy") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
$fileName = "SiteStats-" + $dateTime + ".csv" | |
$OutPutView = $directorypath + "\Logs\"+ $fileName | |
$Excludedsites =@("https://contosoonline.sharepoint.com/sites/ACT-TrunkDemo-OpenAccess","https://contosoonline.sharepoint.com/teams/TrunkDemo","https://contosoonline.sharepoint.com/sites/Test-OpenAccess" | |
,"https://contosoonline.sharepoint.com/teams/Test1","https://contosoonline.sharepoint.com/sites/d-intranet", |
NewerOlder