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
| # Inspiration from https://twitter.com/mrhvid/status/929717169130176512 @mrhvid @Lee_Holmes | |
| function ResolveIp($IpAddress) { | |
| try { | |
| (Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost | |
| } catch { | |
| $null | |
| } | |
| } |
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
| $ips = 1..255 | % {"172.20.1.$_"} | |
| $t=$ips|%{(New-Object Net.NetworkInformation.Ping).SendPingAsync($_,250)};[Threading.Tasks.Task]::WaitAll($t);$t.Result | select Address, Status, RoundtripTime | %{ if($_.Status -eq "Success"){$_}} | |
| <# | |
| Measure-Command -Expression { | |
| $ips = 1..255 | % {"172.20.1.$_"} | |
| $t=$ips|%{(New-Object Net.NetworkInformation.Ping).SendPingAsync($_,250)};[Threading.Tasks.Task]::WaitAQll($t);$t.Result | select Address, Status, RoundtripTime | %{ if($_.Status -eq "Success"){$_}} | |
| } | Select Milliseconds | |
| #> |
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
| ## This can be a remote PC name as well | |
| $pc = '.' | |
| $cert_store = 'My' | |
| $store = New-Object system.security.cryptography.X509Certificates.X509Store ("\$pcMy"),'LocalMachine' #LocalMachine could also be LocalUser | |
| $store.Open('ReadWrite') | |
| ## Find all certs that have an Issuer of my old CA | |
| $certs = $store.Certificates | ? {$_.Issuer -eq 'CN=HOST.DOMAIN.COM, DC=DOMAIN, DC=EXT'} | |
| ## Remove all the certs it finds | |
| $certs | % {$store.Remove($_)} |
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
| Start a service on remote computer: | |
| Start-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler) | |
| Stop a service on remote computer: | |
| Stop-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler) | |
| Restart a service on remote computer: | |
| Restart-Service -InputObject $(Get-Service -Computer COMPUTER1 -Name spooler) |
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
| @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
| choco install 7zip /y | |
| choco install adobereader /y | |
| choco install anaconda3 /y | |
| choco install azure-cli /y | |
| choco install docker-for-windows /y | |
| choco install firefox /y | |
| choco install garmin-express /y | |
| choco install git /y |
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
| #Prep | |
| Update-ExecutionPolicy Unrestricted | |
| Disable-UAC | |
| #Win Config | |
| Set-TaskbarOptions -Size Small -Lock -Dock Top | |
| Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| Disable-InternetExplorerESC |
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
| gcim Win32_OperatingSystem | select csname, lastbootuptime |
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
| ## This Script has been written for converting a Dell Service Tag into Express service Tag | |
| ## Author : Prakash Kumar ([email protected]) May 22th 2018 | |
| ## www.adminthing.blogspot.com | |
| ## Please use this script at your own risk. | |
| ## | |
| ## Usage: | |
| ## Since this has a function so it needs to be loaded into the memory of PS console by dot sourcing it: ** | |
| ## PS C:\> . ./ConvertTo-ExpressServiceTag.ps1 | |
| ## PS C:\> Convertto-ExpressServiceTag A1B2C3D | |
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
| <# | |
| .NOTES | |
| <Additional information about the function or script.> | |
| Version: 1.0 | |
| Author: Pratik Pudage ([email protected]) | |
| Creation Date: 5/28/2018 | |
| .LINK | |
| https://gallery.technet.microsoft.com/scriptcenter/Script-to-compare-a-list-abbba793 |
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
| <# | |
| .NOTES | |
| Version: 2.0 | |
| Author: Pratik Pudage ([email protected]) | |
| Creation Date: 5/28/2018 | |
| Purpose/Change: | |
| - Included HTML Email Reporting. | |
| - Included exclusion criteria. | |
| .LINK |