Of course,
you probably don??™t have a profile yet, so type:
New-Item -type file -force $profile
to create one. Then type:
notepad $profile
to open the newly created profile for editing.
PowerShell has about 130 commands, most of which are documented in the
UserGuide.rtf file included with the package. There??™s also a simple online help
system, via the help command, that displays a list of available commands (in a
Table 9-1. Common DOS and Unix commands and their PowerShell equivalents
DOS Unix PowerShell Description
cd cd Set-Location Change the working directory (folder)
cls clear Clear-Host Clear the screen
copy cp Copy-Item Copy a file or object from one place to another
del, rd rm, rmdir Remove-Item Delete a file, directory (folder), or object
dir ls Get-ChildItem Display the contents of the current directory or object
help man Get-Help Display a list of commands or details about the specified
command
md mkdir New-Item Create a directory (folder) or object
move mv Move-Item Move a file, directory (folder), or object to a new location
ren mv Rename-Item Change the name of a file or object
type cat Get-Content Display the contents of a file or object
Windows PowerShell | 567
Scripting and
Automation
not-so-helpful format), or if invoked with the name of a command, displays
the syntax and explanation of the command. To see all the available information
about a command, include the -full parameter, like this:
help Get-Item -full
While using the online help, you??™ll soon discover the needlessly complex
SYNTAX section, which lists all the parameters supported by a single command.
Pages:
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789