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

Which of the following methods should be used to remove all white-space characters from the start and end of a variable string?

Answer :
  • Trim()

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

Answer :
  • remove-item