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
Remove-Item "$env:APPDATA\GitHub Desktop\window-state.json" -Force |
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
#Inspired from the work of Jack (@sharepointjack) - http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules | |
#Will test all installed modules against the PSGallery and see if a never version is available | |
$mods = Get-InstalledModule | |
foreach ($mod in $mods) { | |
Write-Host "Checking $($mod.name)" | |
$latestAvailable = Find-Module $mod.Name -ErrorAction SilentlyContinue | |
if($null -eq $latestAvailable) { continue } |
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
#Inspired from the work of Jack (@sharepointjack) - http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules | |
#Will test all installed modules against the PSGallery and see if a never version is available. | |
#If newer version is available it will update it | |
$mods = Get-InstalledModule | |
foreach ($mod in $mods) { | |
Write-Host "Checking $($mod.name)" | |
$latestAvailable = Find-Module $mod.Name | |
if ($mod.version -eq $latestAvailable.version) { |
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
#Copy & pasted from the work of Jack (@sharepointjack) - http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules | |
#Will test all installed modules for multiple versions installed on the machine | |
$mods = Get-InstalledModule | |
foreach ($Mod in $mods) { | |
Write-Host "Checking $($mod.name)" | |
$latest = Find-Module $mod.name | |
$specificmods = Get-InstalledModule $mod.name -allversions | |
Write-Host "$($specificmods.count) versions of this module found [ $($mod.name) ]" |
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
#Copy & pasted from the work of Jack (@sharepointjack) - http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules | |
#Will test all installed modules for multiple versions installed on the machine. | |
#All versions that are below the highest will be uninstalled | |
$mods = Get-InstalledModule | |
foreach ($Mod in $mods) { | |
Write-Host "Checking $($mod.name)" | |
$latest = Get-InstalledModule $mod.name | |
$specificmods = Get-InstalledModule $mod.name -allversions | |
Write-Host "$($specificmods.count) versions of this module found [ $($mod.name) ]" |
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
Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Local\Devolutions\RemoteDesktopManager" -Filter "*lyt" -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue | |
#Window pane / Window tab - clear design, only navigation. Exit | |
Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Local\Devolutions\RemoteDesktopManager" -Filter "*lyt" -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue |
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
$temp = Read-Host "Fill in DOMAIN\USERNAME" | |
if(($temp.Length - ($temp.IndexOf("\")) + 1) -gt 20) { | |
$temp.Substring(0, $temp.IndexOf("\")+1) + $temp.Substring($temp.IndexOf("\")+1, 20) | |
} else { | |
$temp | |
} |
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
function Uninstall-ModuleOldVersion { | |
[CmdletBinding()] | |
[OutputType()] | |
param ( | |
[Parameter(Mandatory = $false, Position = 1)] | |
[string] $Module = "*" | |
) | |
#Copy & pasted from the work of Jack (@sharepointjack) - http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules | |
#Will test all installed modules for multiple versions installed on the machine. |
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
Add-Type -AssemblyName System.Web | |
$storageAccountName = "VALUE" | |
$tableName = "countries" | |
$sasToken = "?sv=2018-03-28....." | |
$partitionKey = "All" | |
$entityKey = "PartitionKey={0},RowKey={1}" | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
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
SELECT ' Drop view ' + s.NAME + '.' + v.NAME | |
FROM sys.views v | |
JOIN sys.schemas s | |
ON v.[schema_id] = s.[schema_id] | |
WHERE v.type = 'V' |