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
# sleepy flower girl | |
(◡ ‿ ◡ ✿) | |
# y u no | |
ლ(ಠ益ಠლ) | |
# smiling breasts | |
(^人^) | |
# flipping tables |
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 Resolve-FullPath | |
{ | |
[CmdletBinding()] | |
[OutputType([string])] | |
param ( | |
# The Path to the File or Folder | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
[Alias("FullName")] | |
[ValidateNotNullOrEmpty()] |
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
<# | |
.SYNOPSIS | |
Assert-All returns true if EVERY object in the pipeline evaluates to true. | |
.DESCRIPTION | |
Assert-All returns true if every item in the pipeline evaluates to true. | |
Assert-All will not return until the entire pipeline has been processed. |
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
# There are lots of "one-liner" scripts out to grab this data, but this isn't one | |
# this is broken apart to make it easier to follow along with and adjust as needed | |
# download raw data at https://www.epa.gov/sites/production/files/2015-09/ucmr-3-occurrence-data.zip | |
# extract it and update the two paths below, or just run this from the extracted directory. | |
$zipFile ="UCMR3_ZipCodes.txt" | |
$AllFile = "UCMR3_All.txt" | |
# replace these zip codes with ones you are interested in | |
[string[]] $ZipCodes = @('48103','28401') |
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
<# | |
.EXAMPLE | |
Get-WindowsUpdateStatus -ComputerName ('Server01.test.local,'Server02.test.local') | |
ComputerName HasPendingUpdates Updates | |
------------ ----------------- ------- | |
Server01 False {} | |
Server01 False {} |
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
$Computers = (Get-ADComputer -Filter {Name -like '*'}).DNSHostName | |
$TestedPath = "C:\Program Files\Git" # this is the example path I am checking for. | |
if(-not $Credential ){ | |
$Credential = Get-Credential | |
} | |
Write-Verbose "Determining which computers can be reached, this may take a long time depending on your environment." -Verbose | |
[string[]] $reachableComputers = $Computers | where {Test-Connection -ComputerName $_ -Quiet -Count 1} |
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
$script:bg = [Console]::BackgroundColor; | |
$script:first = $true; | |
$script:last = 0; | |
Import-Module Posh-Git | |
$BranchBehindAndAheadStatusForegroundColor = [System.ConsoleColor]::Magenta | |
$BranchBehindStatusForegroundColor = [System.ConsoleColor]::Yellow | |
$BranchAheadStatusForegroundColor = [System.ConsoleColor]::Green | |
$BranchIdenticalStatusToForegroundColor = [System.ConsoleColor]::White | |
$workingAdded = '+' |