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
| ################################################ | |
| # | |
| # PREPARATION / ASSEMBLIES | |
| # | |
| ################################################ | |
| # Load scriptpath | |
| if ($MyInvocation.MyCommand.CommandType -eq "ExternalScript") { | |
| $scriptPath = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition | |
| } else { |
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
| Function Get-StringHash() | |
| { | |
| param( | |
| [Parameter(Mandatory=$true)][string]$inputString, | |
| [Parameter(Mandatory=$true)][string]$hashName, | |
| [Parameter(Mandatory=$false)][string]$salt, | |
| [Parameter(Mandatory=$false)][boolean]$uppercase=$false | |
| ) | |
| $string = $inputString + $salt |
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
| $jobs = Invoke-RestMethod -Uri "http://spatial.virtualearth.net/REST/v1/dataflows/listjobs?key=<yourbingmapskey>&output=json" -Method Get # -ProxyUseDefaultCredentials $true # -Proxy "http://proxy:8080" -ProxyCredential $cred | |
| $jobs.resourceSets.resources | select id -expand links |
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
| ################################################ | |
| # | |
| # SETTINGS | |
| # | |
| ################################################ | |
| # settings for the API | |
| $bingMapskey = "<yourbingmapskey>" | |
| # file should be in UTF8 |
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
| # list all devices like samsung | |
| Get-PnpDevice | where { $_."FriendlyName" -like "*samsung*" } |
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
| # settings files | |
| ionos.json | |
| # encryption files | |
| aes.key |
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
| # function from https://gallery.technet.microsoft.com/scriptcenter/Get-StringHash-aa843f71 | |
| Function Get-StringHash([String] $String,$HashName = "MD5") | |
| { | |
| $StringBuilder = New-Object System.Text.StringBuilder | |
| [System.Security.Cryptography.HashAlgorithm]::Create($HashName).ComputeHash([System.Text.Encoding]::UTF8.GetBytes($String))|%{ | |
| [Void]$StringBuilder.Append($_.ToString("x2")) | |
| } | |
| $StringBuilder.ToString() | |
| } |
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
| # from: https://stackoverflow.com/questions/38311797/recycle-application-pool-using-powershell-script | |
| Import-Module WebAdministration | |
| <# | |
| show all sites | |
| ( Get-Item "IIS:\Sites" ).children | |
| show all application pools |
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
| ################################################ | |
| # | |
| # SETTINGS | |
| # | |
| ################################################ | |
| $virtualVariableReference = "kuBPCHF9" | |
| $virtualBaseDir = "C:\FastStats\Publish\Handel\virtual" |