Powershell Reference Feb2010
Powershell Reference Feb2010
How to Solicit )n ut
To solicit input from a user, use the Read-Host cmdlet, followed by the prompt to be displayed: $a = :ea#-;ost -%!ease enter 7our name-
Get-%rocess | &ut-'i!e C:\Test.txt (appen# !ou can also use the "#$%&# redirection characters '( for write, (( for append) when using *indows +ower#hell. This command writes data to the file ,:-#cripts-Test.txt: Get-%rocess ) C:\Scripts\Test.txt .nother option is to use the !x ort-CS" cmdlet to save data as a comma$separated$values file: Get-%rocess | *xport-CS+ C:\Test.cs,