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
# Will return false if you aren't in a UAC evelvated command prompt. true if you are. | |
(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) |
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
REG ADD "HKCU\Software\Microsoft\Internet Explorer\View Source Editor\Editor Name" /t REG_SZ /d "C:\Code\Tools\Notepad2\Notepad2.exe" |
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 reverseString | |
{ | |
Param( | |
[string]$str | |
) | |
$sb = New-Object System.Text.StringBuilder($str.Length) | |
write-verbose $sb.Capacity | |
for ($i = ($str.Length - 1); $i -ge 0; $i--) |
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
@REM Disable server side | |
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server" /VE | |
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Server" /V Enabled /T REG_DWORD /D 0 | |
@REM To force disable client side, overkill. Use client config (i.e. IE Internet Options etc.) | |
@REM REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Client" /VE | |
@REM REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\SSL 3.0\Client" /V DisabledByDefault /T REG_DWORD /d 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
Get-WmiObject -Class Win32_OperatingSystem -Namespace "root\cimv2" | format-list Caption, Version |
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
gci . -recurse -filter *.ps* | % { | |
$MyFile = gc $_.Fullname -raw | |
$MyPath = $_.Fullname | |
[System.IO.File]::WriteAllLines($MyPath, $MyFile, [System.Text.UTF8Encoding]($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
Import-Module Microsoft.PowerShell.Security | |
set-location cert: | |
Get-ChildItem -recurse | Where-Object {$_.Thumbprint -match "98A04E4163357790C4A79E6D713FF0AF51FE6927"} | write-host "eDellRoot Found" |
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
# Current User | |
dir Cert:\CurrentUser\ -Recurse | where {(($_.Issuer -ne $null) -and ($_.Issuer.ToString() -match '.*Apple.*')) } | |
dir Cert:\CurrentUser\ -Recurse | where {(($_.Issuer -ne $null) -and ($_.Issuer.ToString() -match '.*Microsoft.*')) } | |
# Current Machine | |
dir Cert:\LocalMachine\ -Recurse | where {(($_.Issuer -ne $null) -and ($_.Issuer.ToString() -match '.*Apple.*')) } | |
dir Cert:\LocalMachine\ -Recurse | where {(($_.Issuer -ne $null) -and ($_.Issuer.ToString() -match '.*Microsoft.*')) } |
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
# Scans the 192.168.1.nnn hosts for http responses. | |
for ($i = 1; $i -ile 254; $i++) { | |
$testAddress = "192.168.1." + $i | |
$info = Test-NetConnection -ComputerName $testAddress -CommonTCPPort http -InformationLevel Quiet | |
if ($info -eq $true) | |
{ | |
write-host "$testAddress is listening on 80 for HTTP traffic" | |
} | |
} |
OlderNewer