You are on page 1of 3

Powershell Core - multiplatform. Open source. PS for windows is "feature complete".

Doesn't have all


the Windows cmds in it. Win PS is 5.1

Need it as it controls admin for everything. Certs need it.

Use VSCode instead of ISE.

PS C:\Work\Powershell> get-service | pipe lets you enter multiline commands.


>> where-object Status -eq 'stopped' |
>> select-object Name, Status

Create a variable:

$data = get-service | where-object status -eq 'Stopped' | select-object Name,Status

$data | out-file .\services.csv not really a csv, so use export-file

$data | export-csv .\services2.csv

Environment
2x Win 10, 1 x SRV 2019 with AD, file/print.
Me: win2019 clone, NSADMIN.
Intro Win PS console
Installing RSAT tools
Intro PS core console

Win10 box
PS 5.1 as admin.
(get-command).count returns an int.

PS core has fewer commands.

RSAT for windows 10


Install RSAT on Windows 10 using Windows Settings. Installs PS modules as well.
Navigate to the Start Menu –> Settings (Gear) Icon –> Apps , and then click on Optional Features .
Click on Add a Feature. Search for RSAT on Add an Optional Feature window. You will have a series of
options to choose from. Optional Features ...
Choose the components you wish to install and click Install .
After installation is complete, restart the computer. The installed features will shift from Optional
Features to Installed Features after the reboot.
Now can use GUI tools or PS tools.
After installing rsat, look at DHCP commands
get-command -name *DHCP*

Win2019 server admin password: Freddy&&&

Command basics
Usually Verb-noun Do something-to something
get-verb lists all the verbs add/clear/join etc
get-verb -verb set | more or pipe through format-list
get-verb -group security | more
Powershell commmands
Version $PSVersionTable

get-service all started/stopped services

You might also like