Advanced Automated Administration with Windows PowerShell 4.0 Quiz Questions and Answers

Which two parameters does the Set-Alias cmdlet require?

Answer :
  • Name
  • Value

Which command can enumerate a method on multiple objects?

Answer :
  • ForEach-Object

You want to display a list of the files and folders on the c: drive. Which command will you use?

Answer :
  • Get-ChildItem

Which three of the following could be used to get information on the Set-Alias command?

Answer :
  • Get-Help Set-Alias
  • Help Set-Alias
  • Man Set-Alias

You need to locate commands that deal with printers. Which command helps you locate those commands?

Answer :
  • get-command *printer

You would like a count of all the processes on your computer. Which command would you choose to do that?

Answer :
  • (get-process).count

You are reviewing a script and see this statement: $DNS -ne "True ". What does the -ne check for?

Answer :
  • Inequality

Which Sort-Object parameter can be used to removed duplicates?

Answer :
  • Unique

What is the Windows PowerShell command for the RmDir (remove directory) command?

Answer :
  • remove-item

Windows PowerShell always starts a new session with the same drives. Which of the following is not returned by Get-PSDrive?

Answer :
  • User profile information Profile