I hereby claim:
- I am joegasper on github.
- I am joegasper (https://keybase.io/joegasper) on keybase.
- I have a public key ASDCmG_QehgIwQJf6B46RTYvKYONihcYoWYJFBjgf5AZdwo
To claim this, I am signing this object:
| Import-Module AzureRM.Websites | |
| Login-AzureRmAccount | |
| $MyResourceGroup = 'myresourcegroupname' | |
| $MyResourceName = 'myresourcename' | |
| Invoke-AzureRmResourceAction -ResourceGroupName $MyResourceGroup -ResourceType Microsoft.Web/sites -ResourceName $MyResourceName -Action sync -ApiVersion 2015-08-01 -Force -Verbose |
| #[1] https://blogs.msdn.microsoft.com/mssmallbiz/2016/07/10/how-to-download-all-of-the-free-ebooks-and-resources-in-my-free-ebooks-giveaway/ | |
| #[2] https://blogs.msdn.microsoft.com/mssmallbiz/2017/07/11/largest-free-microsoft-ebook-giveaway-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepo/ | |
| #Some links are to webpages or Sway, I'd like to save the link to these pages - still to do. | |
| $saveTo = 'D:\MS_eBooks\' #where to place the eBooks | |
| New-Item -Path $saveTo -ItemType Directory | |
| $masterListLink = 'http://ligman.me/29zpthb' #[1] link to the text file of links to the eBooks. | |
| #$masterListLink = 'http://ligman.me/2sZVmcG' #[2] link to the text file of links to the eBooks. | |
| #Get an array of links, triming the header in the first line. | |
| $eBookLinks = @((Invoke-WebRequest -Uri $masterListLink -MaximumRedirection 1).Content -split "`n" | % {$_.trim()} | select -Skip 1 ) | |
| foreach ($eBookLink in $eBookLinks) { |
| [ScriptBlock]$cmd = { | |
| $SizeGb = 0; Get-ChildItem -Path 'C:\Program Files\Microsoft\Exchange Server\V15\Logging' -Recurse -Filter '*.log' | ? {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | % {$SizeGb += $_.Length/1024/1024/1024}; Write-Output $SizeGb | |
| } | |
| #assumes your systems are named 'myexchbox01', 'myexchbox02', etc. | |
| 1..20 | % { $exmbx = 'myexchbox' + '{0:D2}' -f $_; $ServerGB = Invoke-Command -ComputerName $exmbx -ScriptBlock $cmd; Write-Output "$exmbx = $ServerGB" } |
| $counters = @('\Paging File(_total)\% Usage','\Paging File(_total)\% Usage Peak','\Memory\Available MBytes','\Memory\% Committed Bytes In Use','\System\System Up Time') | |
| $servers = @() | |
| #assumes your systems are named 'myexchbox01', 'myexchbox02', etc. and you have 20 of them | |
| 1..20 | % { $servers += 'myexchbox' + '{0:D2}' -f $_ } | |
| $Path = 'C:\Work\Perf\' | |
| $filename = 'Exchange' | |
| $delay = 1 | |
| $count = 1 | |
| $sequence = 1 | |
| $testrun = Get-Date -Format yyyy-MM-dd |
| #Requires -Version 4.0 | |
| #Create your record and then immediately run this script | |
| $domainSuffix = '.my.domain.edu' #domain suffix for less typing | |
| $client = 'dept-joe04' #client to query for on the DCs | |
| $DNStype = 'CNAME' #type of DNS record to query | |
| $DCs = @('dc-01','dc-02','dc-03','dc-04') #DCs to query against | |
| $DClength = (-join $DCs).Length #for determining when all DCs have answered | |
| $DCdone = '' #string that collects DC names as they answer | |
| Write-Output "Checking $client at $(Get-Date)" |
| #Wi-Fi Connection Information | |
| $data = (netsh wlan show networks mode=Bssid | | |
| where {$_ -like "SSID*" -or $_ -like "*Authentication*" -or $_ -like "*Encryption*" -or $_ -like "*Signal*"}).trim() | |
| $result = for ( $i = 0; $i -lt $data.count; ) { | |
| '' | Select @{n='Connection';e={($data[$i].split(':')[1]).trim()}}, | |
| @{n='Authentication';e={($data[$i+1].split(':')[1]).trim()}}, | |
| @{n='Encryption';e={($data[$i+2].split(':')[1]).trim()}}, | |
| @{n='Signal';e={($data[$i+3].split(':')[1]).trim()}} | |
| $i = $i + 4 | |
| } |
I hereby claim:
To claim this, I am signing this object:
| #Show all values in sequence up to number $seqnum | |
| [int]$seqnum = 10 | |
| $fibseq = @() | |
| for($i = 0; $i -lt $seqnum; $i++) { | |
| if ($i -eq 0 ) { | |
| $fibseq = $fibseq + 0 | |
| } | |
| if ($i -eq 1 ) { | |
| $fibseq = $fibseq + $i | |
| } |
| #Simple check on a generic WordPress site | |
| $page = Invoke-WebRequest -Uri http://mywordpress03.site | |
| $WPver = ($page.Scripts.src).where({$_ -match 'wp-embed.min'}).Split('=')[1] |
| #Updated ConvertFrom-DN to support container objects | |
| function ConvertFrom-DN { | |
| [cmdletbinding()] | |
| param( | |
| [Parameter(Mandatory, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)] | |
| [ValidateNotNullOrEmpty()] | |
| [string[]]$DistinguishedName | |
| ) | |
| process { |