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
$trustedHosts = Get-Item WSMan:\localhost\Client\TrustedHosts | |
if ($trustedHosts.Value -eq "") { | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $ipAddress -Force | |
} | |
elseif (-not $trustedHosts.Value.Contains($ipAddress)) { | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "$($trustedHosts.Value),$($ipAddress)" -Force | |
} |
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
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $ipAddress -Force |
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
$baseUrl = "http://assets.pokemon.com/assets/cms2/img/pokedex/full/" | |
New-Item .\pokedex -type directory | |
for ($i = 1; $i -lt 721; $i++) { | |
$fileName = $i.ToString("000") + ".png" | |
$url = $baseUrl + $fileName | |
$output = "pokedex\" + $fileName | |
Write-Host $fileName |
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
public HandRank GetHandRank() => | |
IsRoyalFlush() ? HandRank.RoyalFlush : | |
IsStraightFlush() ? HandRank.StraightFlush : | |
IsFourOfAKind() ? HandRank.FourOfAKind : | |
IsFullHouse() ? HandRank.FullHouse : | |
IsFlush() ? HandRank.Flush : | |
IsStraight() ? HandRank.Straight : | |
IsThreeOfAKind() ? HandRank.ThreeOfAKind : | |
IsTwoPair() ? HandRank.TwoPair : | |
IsPair() ? HandRank.Pair : |
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
# Gets the IP address of a computer via the MAC address. This will only work on LAN | |
# segments. By default we'll scan the ARP table, but then defer to an IP scan to | |
# as needed. | |
# | |
# Usage: $returnIpAddress = GetIPFromMAC "12-43-de-52-a9-99" "192.168.10." | |
# Pass in the mac address with dashes (-) as the first parameter | |
# Pass in an IP address with the last number missing, be sure to include the trailing "." | |
# Be sure to check the value if $returnIpAddress -eq $null to see if a value was actually returned | |
# | |
function GetIPFromMAC { |
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
for ($i = 1; $i -lt 255; $i++) { | |
ping "$networkSegment$i" -n 1 -l 1 -4 -w 500 | Out-Null | |
$ip = arp -a "$networkSegment$i" | Select-String $macAddress |% { $_.ToString().Trim().Split(" ")[0] } | |
if ($ip -ne $null) { | |
Write-Host "Found $macAddress during deep scan, IP: $ip" | |
break | |
} | |
} |
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
$ip = arp -a "$IPAddress" | Select-String $macAddress |% { $_.ToString().Trim().Split(" ")[0] } |
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
Param | |
( | |
[string] $userName | |
) | |
netsh http add urlacl url=http://127.0.0.1:9095/ user=$userName | |
netsh http add urlacl url=http://localhost:9095/ user=$userName | |
netsh http add urlacl url=http://$env:computername`:9095/ user=$userName |