Getting started, part 1 of 3

First of all, your old commands that you used in cmd.exe still work. You have to be a tiny bit stricter in syntax. For example, when you navigate to the parent folder in cmd.exe, you could write:

cd..

In PowerShell, you have to add a space between cd and .., but if you do that, it will work fine.

cd ..

Then, when you approach the new commands (cmdlets) in PowerShell, it might be good to know how to get help. To get a list of all available cmdlets, type Get-Command:
Programmen (cmdlet) i Powershell har namn som består av ett verb, ett bindestreck och ett substantiv, t.ex. Write-Progress. För att få en lista över alla cmdlets, skriv:

Get-Command

All cmdlets have name that consists of a verb and a noun. You should see a list of all cmdlets. If you know the verb, and want to see what available cmdlets that begins with that verb, you add the argument -Verb followed by the actual verb. For example, if you want to see a list of all cmdlets that begin with the verb Move, type:

Get-Command –Verb Move

You now see a list with all cmdlets that begin with the verb Move (Move-Item, Move-ItemProperty).
To get help on a specific cmdlet, type Get-Help followed by the cmdlet. Example:

Get-Help Move-Item

Add the parameter -detailed for a deeper description, or -full for the complete documentation on the cmdlet. This will tell you all there is to know about Move-Item:

Get-Help Move-Item –full

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll:

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Comments

Important information: If you have not commented before, your comment will be reviewed before it is published. This means that you will not see it immediately, but I have received it. This is not because I want to filter comments, but because I want to prevent spam and advertising.

Leave a Reply

Your email address will not be published. Required fields are marked *