To get all subnets in your Active Directory, use this PowerShell oneliner:
08 December 2021
Get all subnets in you Active Directory
16 July 2021
Get Windows 10 saved WiFi passwords using PowerShell
I wrote an under-100-character oneliner for getting all saved WiFi passwords on Windows 10 computer:
netsh wl sh p|%{($_-split': ')[1]}|%{$_;netsh wl sh p n=$_ k=clear|%{($_-split'nt\s+: ')[1]};''}
Ouput will be in the format:
SSID (network name)
WPA key (network password)
Each combo will be separated with an empty line. If some WiFi networks haven't got password, then only SSID will be shown.
09 April 2021
Shrink WSUS database
06 November 2020
Invoke-Command and local variables in PowerShell
Just use "using:" before the variable name
$abc= 'some text'
icm servername {'----';echo $abc;'----'}
icm servername {'====';echo $using:abc;'===='}
03 November 2020
How to work with printers like PowerShell guru
14 November 2019
How to install Adobe Reader using command line
First you need to open powershell as admin by pressing Windows+X and then A.
In the powershell prompt type following:
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
This will install chocolatey software management utility.
Open next powershell window using the same Windows+X, A shortcut and type:
cinst adobereader -y
This will install Adobe Reader to your system.
To list, what software has been installed using chocolatey, use this command:
clist -l
To get more information about chocolatey, go to web site https://chocolatey.org/
Choco






