Skip to content

Instantly share code, notes, and snippets.

View chris1984's full-sized avatar

Chris Roberts chris1984

View GitHub Profile
@chris1984
chris1984 / powerCLI cheat sheet
Last active May 8, 2023 19:08 — forked from githubfoam/powerCLI cheat sheet
powerCLI cheat sheet
------------------------------------------------------------------------------------------------------------------------------------
Get-Help Get-Snapshot
Get-Help XXX (cmdlet)
REMARKS
To see the examples, type: "get-help Get-Snapshot -examples".
For more information, type: "get-help Get-Snapshot -detailed".
For technical information, type: "get-help Get-Snapshot -full".
For online help, type: "get-help Get-Snapshot -online"
source ~/foreman/.env
BIND=0.0.0.0 bundle exec puma -w 1 -t 1 -p $PORT --preload
@chris1984
chris1984 / pingsweep.ps1
Created March 27, 2018 20:34 — forked from jimfdavies/pingsweep.ps1
Quick script to ping a subnet and report if each IP address is used or 'empty'. Can be extended to redirect to a file if desired.
$subnet24 = "10.10.1"
1..254 |
foreach-object {
$ip = $subnet24 + "." + $_
if (test-connection $ip -count 1 -quiet) { Write-Host "USED:$ip" } else { Write-Host "EMPT:$ip" }
}
#USED:10.10.2.1
#EMPT:10.10.2.2