To | Do This |
---|---|
Produce a list of all the files in a folder | Use the Get-ChildItem cmdlet and supply a value for the folder |
Produce a list of all the files in a folder and in the subfolders | Use the Get-ChildItem cmdlet, supply a value for the folder, and specify the recurse argument |
Produce a wide output of the results of a previous cmdlet | Use the appropriate cmdlet and pipe the resulting object to the Format-Wide cmdlet |
Produce a listing of all the methods available from the Get-ChildItem cmdlet | Use the cmdlet and pipe the results into the Get-Member cmdlet. Use the -membertype argument and supply the Noun method |
Produce a popup box | Create an instance of the wshShell object by using the New-Object cmdlet. Use the Popup method |
Retrieve the currently logged-on user name | Create an instance of the wshNetwork object by using the New-Object cmdlet. Query the username property |
Retrieve a listing of all currently mapped drives | Create an instance of the wshNetwork object by using the New-Object cmdlet. Use the EnumNetworkDrives method |