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
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 |
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 Get-Uptime { | |
<# | |
.Synopsis | |
Gets a computer's uptime information. | |
.Description | |
Gets a computers uptime information including: | |
Uptime in Days | |
Starttime |
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
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 |
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
# ----- 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. |
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-ciminstance -ComputerName 'localhost'-ClassName Win32_operatingSystem | FT PSComputerName,ServicePackMajorVersion,Version,@{N='BIOSSerial'; E={(Get-CIMInstance -ComputerName $_PSComputerName -ClassName Win32_BIOS).SeriNumber}} -AutoSize |