Skip to content

Instantly share code, notes, and snippets.

View jeffbuenting's full-sized avatar

Jeff Buenting jeffbuenting

View GitHub Profile
Enter file contents hereFunction Get-Diacritic {
<#
.Synopsis
Creates a report of files that do not contain diacritic characters.
.Description
Emails a report of files that do not contain diacritic characters ( ascii chars between 80 and FF hex )
.Parameter Searchroot
Function Get-Uptime {
<#
.Synopsis
Gets a computer's uptime information.
.Description
Gets a computers uptime information including:
Uptime in Days
Starttime
import-csv f:\temp\input.csv | foreach {$_ | Add-Member -MemberType NoteProperty -PassThru -Name OSVersion -Value ( gwmi -class Win32_OperatingSystem -ComputerName ($_.MachineName)).Caption } | export-csv f:\temp\output.csv
@jeffbuenting
jeffbuenting / gist:a3846ff2a91aefeaad87
Created August 7, 2015 15:08
2015 AUG Powershell SCripting Games
# ----- Single Line
invoke-restmethod -Uri "www.telize.com/geoip" | Format-Table -AutoSize -Property Longitude,Latitude,Continent_Code,Timezone
# ----- Wrapped in a function
Function Get-GEOInformation {
<#
.Description
Returns the location information from any IP.
@jeffbuenting
jeffbuenting / gist:d9db3c8a425dda1a12ba
Created July 10, 2015 14:46
2015-July Scripting Games Puzzle
get-ciminstance -ComputerName 'localhost'-ClassName Win32_operatingSystem | FT PSComputerName,ServicePackMajorVersion,Version,@{N='BIOSSerial'; E={(Get-CIMInstance -ComputerName $_PSComputerName -ClassName Win32_BIOS).SeriNumber}} -AutoSize