Startsidan  ▸  Texter  ▸  Teknikblogg

Anders Hesselbom

Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.

Getting started, part 1 of 3

2008-12-13

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

Categories: PowerShell

Tags: PowerShell

Leave a Reply

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



En kopp kaffe!

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

Bjud på en kopp kaffe!

Om...

Kontaktuppgifter, med mera, finns här.

Följ mig

Twitter Instagram
GitHub RSS

Public Service

Folkbildning om public service.

Hem   |   linktr.ee/hesselbom   |   winsoft.se   |   80tal.se   |   Filmtips