As the headline says, I am going to show you which tools are no longer needed when you are familiar with PowerShell. No long speeches today, just examples. I’m pretty sure some of you will find something new here. Let’s start …
WinZip / 7zip
With PowerShell 5.0 two new commands are introduced: Compress-Archive and Expand- Archive. The commands compress and decompress data.
Compress-Archive -Path C:\Temp\* -DestinationPath C:\Temp\Compressed.zip
Expand-Archive -Path C:\Temp\Compressed.zip -DestinationPath C:\Temp\
To create a certificate for digital signing, encryption and more enter
New-SelfSignedCertificate -DnsName pewa2303 -CertStoreLocation "Cert:\CurrentUser\My" -KeyUsage KeyEncipherment,DataEncipherment, KeyAgreement -Type DocumentEncryptionCert
Various Encryption Tools vs. Protect-CMSMessage
The Protect-CmsMessage cmdlet encrypts content. Make sure, you’re running PowerShell 5.0 or above and you have created a certificate as shown above.
"This is a secret message" | Protect-CmsMessage -To cn=pewa2303 -OutFile C:\Temp\secret.txt
To decrypt data run
Unprotect-CmsMessage -Path C:\Temp\secret.txt
Putty is a great tool. If you want to connect to remote hosts you can also use the PowerShell Module Posh-SSH.
First install it via online repository.
Find-Module Posh-SSH | Install-Module
Then connect to your Linux, Cisco or whatever host.
New-SSHSession -ComputerName Server01
Then run your commands.
Invoke-SSHCommand -SessionId 0 -Command cut -d: -f1 /etc/passwd
The following can’t compete with nmap, but it is included with Windows and ready to go out of the box.
Test-NetConnection www.sid-500.com -Port 443
HashCheck or what they are called
To view the hash of a file run
Get-FileHash -Path C:\Patrick\Data.txt | Format-List
If you are familiar with WMI, you can check everything about your system.
Get-WmiObject win32_physicalmemory | Format-Table Manufacturer,Banklabel,Configuredclockspeed,Devicelocator,Capacity,Serialnumber -autosize
Various ping tools
If you want to do a ping to multiple hosts use Test-Connection.
Test-Connection sid-500.com,192.168.0.105 -Quiet
There are two reasons why Windows users install so many 3rd party tools: Either the tools are better than the supplied tools or there is a lack of knowledge.
In any case, before deciding to install a tool, you should take a look around to see if it is possible with Windows onboard tools.
I hope the contribution was helpful and informative.