This file contains 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 = "EffectivePermissionsReport-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
$userName = "i:0#.f|membership|test.test@contoso.co.uk" | |
#Connect to PnP Online | |
Connect-PnPOnline -Url $tenantUrl -Interactive |
This file contains 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", |
This file contains 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-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
#Connect to PnP Online | |
Connect-PnPOnline -Url $tenantUrl -Interactive |
This file contains 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-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
#Connect to PnP Online | |
Connect-PnPOnline -Url $tenantUrl -Interactive |
This file contains 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-" + $dateTime + ".csv" | |
$ReportOutput = $directorypath + "\Logs\"+ $fileName | |
#Connect to PnP Online | |
Connect-PnPOnline -Url $tenantUrl -Interactive |
This file contains 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
Clear-Host | |
$properties=@{SiteUrl='';SiteTitle='';ListTitle='';Type='';RelativeUrl='';ParentGroup='';MemberType='';MemberName='';MemberLoginName='';Roles='';}; | |
$dateTime = (Get-Date).toString("dd-MM-yyyy-hh-ss") | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = (Split-Path $invocation.MyCommand.Path) + "\Logs\" | |
$excludeLimitedAccess = $true; | |
$includeListsItems = $true; |
This file contains 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
Public Function StripHTML(ByVal sInput As String) As String | |
IF sInput IsNot Nothing Then | |
IF(sInput <>"") Then | |
Dim objRegExp AS NEW System.Text.RegularExpressions.Regex("<(.|\n)+?>") | |
sInput = Replace(sInput, "<BR>", Chr(10)) | |
sInput = Replace(sInput, "<br>", Chr(10)) | |
sInput = Replace(sInput, "<br/>", Chr(10)) | |
sInput = Replace(sInput," ", " ") | |
sInput = Replace(sInput, "<li>", "-") |
This file contains 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
BEGIN TRAN | |
if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tmp_table_value') and xtype='U') | |
drop table #tmp_table_value | |
CREATE TABLE #tmp_table_value | |
([table_id] [int] NOT NULL, | |
[value_date] [datetime] NOT NULL, | |
[raw_value] [decimal](12, 6) NULL | |
) |
This file contains 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
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | |
Set-Location $PSScriptRoot | |
$pLoadCSOMProperties=(get-location).ToString()+"\Load-CSOMProperties.ps1" | |
. $pLoadCSOMProperties | |
Function DeleteVersionsFromLists($web, $versionCount) | |
{ |
NewerOlder