Trying to Learn PowerShell

The first command I would like to try and remember is Get-Command

Get-Command Get-Service -Syntax

Syntax adds a how-to feature that allows you to see the different parameters that can be used with the command.

Compress-Archive compresses a file into a zip file.

Compress-Archive -Path c:\temp -DestinationPath c:\temp\myfile.zip

To expand the archive do the following:

Expand-Archive -Path c:\temp\myfile.zip -DestinationPath c:\temp\powershell

Example of Get-Help

Get-Help Get-Process -Full

Get-Content C:\Temp\misc.txt | Measure-Object -word | Select-Object words

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close