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
##################### | |
# PREREQUISITES | |
##################### | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Set-TaskbarSmall | |
# Console | |
cinst PowerShell | |
cinst poshgit |
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
$username = "" | |
$password = "" | |
$Password = ConvertTo-SecureString -String $password -AsPlainText -Force; | |
$Credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password | |
Connect-SPOService -Url "https://[tenant]-admin.sharepoint.com" -Credential $Credentials | |
Get-SPODeletedSite | Remove-SPODeletedSite |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
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
{ | |
"Condition statement": { | |
"prefix": "cond", | |
"body": [ | |
"${_} { ${0}; break }" | |
], | |
"description": "Switch condition statement" | |
}, | |
"Condition single quoted string statement": { |
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
@echo off | |
@echo Stopping Sharepoint services... | |
@echo Restarting The SharePoint Timer Service... | |
net stop SPTimerV4 | |
net start SPTimerV4 | |
@echo Restarting The SharePoint Administration Service... |
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
A collection of my favorites DNS |
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
$currentUTCtime = (Get-Date).ToUniversalTime() | |
$expiredResources = Search-AzGraph -Query 'where todatetime(tags.expireOn) < now() | project id, name' | |
foreach ($r in $expiredResources) { | |
Write-Host "==> Deleting $($r.name)..."; | |
Remove-AzResource -ResourceId $r.id -Force -WhatIf | |
} | |
$expiredResources = Get-AzResourceGroup; |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393216}", | |
"initialCols": 120, | |
"initialRows": 30, | |
"profiles": [ | |
{ | |
"acrylicOpacity": 0.85, |
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
# Remember to run the script "as Administrator" | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\AppData\Local\Microsoft\VisualStudio') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\.nuget\packages') > $null | |
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null |