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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory = $true, HelpMessage = "This is the date used for filtering.")] | |
[string]$StartDate | |
) | |
$ParsedDate = [System.DateTime]$StartDate | |
$CurrentPath = (Get-Item -Path ".\").FullName | |
$CurrentFolder = (Get-Item -Path ".\").Name | |
Get-ChildItem -Path . -Recurse -Attributes !D | Where-Object { |
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
var peoplePickerValue = "[{\"Key\":\"" + user.Email + "\",\"Description\":\"" + user.Email + "\",\"DisplayText\":\"" + user.Email + "\",\"EntityType\":\"\",\"ProviderDisplayName\":\"\",\"ProviderName\":\"\",\"IsResolved\":true,\"EntityData\":{\"SPUserID\":\"" + user.Email + "\",\"Email\":\"" + user.Email + "\",\"IsBlocked\":\"False\",\"PrincipalType\":\"UNVALIDATED_EMAIL_ADDRESS\",\"AccountName\":\"" + user.Email + "\",\"SIPAddress\":\"" + user.Email + "\"},\"MultipleMatches\":[],\"AutoFillKey\":\"" + user.Email + "\",\"AutoFillDisplayText\":\"" + user.Email + "\",\"AutoFillSubDisplayText\":\"\",\"AutoFillTitleText\":\"" + user.Email + "\n" + user.Email + "\",\"DomainText\":\"$domain\",\"Resolved\":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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$false)][Boolean]$setCredentials | |
) | |
Set-Strictmode -Version 1 | |
Import-Module CredentialManager | |
If ($PSCommandPath -eq $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
$spWeb = get-SPWeb "localhost" | |
function getFiles ([Microsoft.SharePoint.SPFolder]$parentFolder) { | |
$files = $parentFolder.Files | |
foreach($file in $files) { | |
Write-Host $file.Name $file.TimeLastModified | |
$b = $file.OpenBinary() | |
$fs = New-Object System.IO.FileStream(("\\server\exportfiles\"+$file.name), [System.IO.FileMode]::Create) | |
$bw = New-Object System.IO.BinaryWrite($fs) |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, HelpMessage="This is the path to the CSV file.")] | |
[string]$CSVFile, | |
[Parameter(Mandatory=$true, HelpMessage="This is the URL to the SharePoint Online site.")] | |
[string]$Url, | |
[Parameter(Mandatory=$false, HelpMessage="This is the path to the DLLs for CSOM.")] | |
[string]$CSOMPath |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, HelpMessage="This is the URL to the SharePoint Online site.")] | |
[string]$Url, | |
[Parameter(Mandatory=$true, HelpMessage="This is the ordering method: 0=Automatic, 1=Manual with Automatic Page Sorting, 2=Manual.")] | |
[ValidateSet(0, 1, 2)] | |
[int]$OrderingMethod, | |
[Parameter(Mandatory=$true, HelpMessage="This is the automatic sorting method: 0=Title, 1=Created Date, 2=Last Modified Date.")] |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, HelpMessage="This is the URL to the SharePoint Online site.")] | |
[string]$Url, | |
[Parameter(Mandatory=$false, HelpMessage="This is the path to the DLLs for CSOM.")] | |
[string]$CSOMPath | |
) | |
Set-Strictmode -Version 1 |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, HelpMessage="This is the URL to the SharePoint Online site where you want to reset inheritance.")] | |
[string]$Url, | |
[Parameter(Mandatory=$false, HelpMessage="If true, all subwebs will be reset as well.")] | |
[Boolean]$Subwebs, | |
[Parameter(Mandatory=$false, HelpMessage="This is the path to the DLLs for CSOM.")] | |
[string]$CSOMPath |
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
$csv | ForEach-Object { | |
Add-Member -InputObject $_ -MemberType NoteProperty -Name 'Row' -Value ([int]($csv.IndexOf($_) / 200)) | |
} | Group-Object -Property 'Row' | ForEach-Object { | |
$_.Group | ForEach-Object { | |
# Compose your batch | |
} | |
$context.ExecuteQuery() | |
} |
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
_spBodyOnLoadFunctionNames.push("DisableDurableLinks"); | |
function DisableDurableLinks() { | |
g_SPOffSwitches["B0081BA8-7C5C-4951-8EAC-C54C3EB91782"] = 1; | |
} |
NewerOlder