PowerShell | Fresco Play
Question 1: Command to display process name and ID of all process is get-process ______.
Answer: Both Select-Object and FT can be used
Question 2: Which is an equivalent PowerShell command for "ls"?
Answer: get-childitem
Question 3: PowerShell commands are case sensitive.
Answer: False
Question 4: The command Get-Process | Where-Object{$_.ProcessName -match "^p. *"} filters the Processes by Process name and lists the Processes which
Answer: starts with Alphabet "P"
Question 5: Error Action Preference specifies the desired behavior for ___________ in PowerShell
Answer: a non-terminating error
Question 6: To get customized output _________ cmdlet is used ____________.
Answer: Format-table
Question 7: PowerShell variables are used to store _______.
Answer: Strings and Number objects
Question 8: ISE is available from _______.
Answer: PowerShell 2.0
Question 9: PowerShell module can contain _______.
Answer: cmd lets, providers,fuctions, variables that can be imported as a single unit.
Question 10: Default version of PowerShell in Windows 10 is __________.
Answer: PowerShell 5.0
Question 11: PowerShell command to view all the properties of a specific Process like "Notepad" is Get-Process notepad | Select-Object -Property *.
Answer: True
Question 12: Command to find the PowerShell Version is _____________.
Answer: $PSVersiontable
Question 13: Pssession is ________.
Answer: 1. Created, Managed and closed by a local system 2. Created, Managed and closed by an application
Question 14: In the command below, how will the value of the variable "$name" be set? $ name=user1 Write-host "$name"
Answer: Value is already defined in the command
Question 15: Variables starts with ______.
Answer: "$"
Question 16: Get-Variable cmdlet displays the list of
Answer: Both Pre-Defined and User-Defined Variables
Question 17: Which of the following are Session Specific commands?
Answer: Both Shell Function and Alias Commands
Question 18: Integrated scripting environment is ______ for PowerShell.
Answer: Host application
Question 19: If $Name="User1" then the command $name.gettype() provides the information on___________?
Answer: Both the options mentioned
Question 20: Open source of PowerShell version is available from the year _______.
Answer: 2016
Question 21: Sort-Object cmdlet is used to __________.
Answer: Sort the list f the object based on the selected property
Question 22: Get-Process | Sort-Object -Property Handles | Select-Object -Last 5 The output of the above command will be the
Answer: 1. List of all Processes sorted by "Handles" 2. List of all the Process
Question 23: In the following command, "-as secured string" is used to ___________. $ password=Read-host "Enter Your Password" -assecured string
Answer: To enter the password securely
Question 24: When PowerShell 2.0 is updated with PowerShell 3.0, then ___________.
Answer: PowerShell 2.0 is left on the System
Question 25: Which of the version of .Net Frame work is required to install PowerShell version 4?
Answer: .Net Framework 4.5
Question 26: Open Source Version of PowerShell contains full set of commands.
Answer: False
Question 27: PowerShell cmdlets performs system administration tasks such as managing ______________.
Answer: All the options mentioned
Question 28: Package management module is available in ________.
Answer: 1. PowerShell 4.0 2. PowerShell 3.0
Question 29: PowerShell for Ubuntu can be downloaded _______________.
Answer: As a Debian Package
Question 30: Alias name of the Format-table is _________.
Answer: ft
Question 31: Read-Host cmdlet is used to ___________
Answer: Prompt the value of the variable interactively
Question 32: Command to display the examples of get-service ______________.
Answer: All the options mentioned
Question 33: Write-host is used to ______.
Answer: Display messages in the PowerShell console
Question 34: In Linux, Powershell is a built-in tool.
Answer: False
Question 35: _____________ is the feature of Commnd Line Tools.
Answer: Requires more time to learn and implement.
Question 36: Default version of PowerShell in Windows 7 is _____________.
Answer: PowerShell 2.0
Question 37: Powershell is built on _____________.
Answer: . Net framework
Question 38: Which of the following are Command Line Tools?
Answer: All the options mentioned
Question 39: Which is an equivalent PowerShell command for "cls"?
Answer: Clear-host
Question 40: List out the PowerShell command types.
Answer: All the options mentioned
Question 41: What is the command to find total number of "FUNCTION" Commands?
Answer: (Get-Command -type function).count
Question 42: Ipconfig/flushdns can be used in PowerShell console.
Answer: True
Question 43: Foreach-Object cmdlet is used to __________.
Answer: Perform an action on each object
Question 44: Pipeline Symbol in PoweShell is _____.
Answer: "|"
Question 45: Where-Object cmdlet is used to __________.
Answer: Filter the objects from the list
Question 46: Function of the Pipeline is _______________.
Answer: All the options mentioned
Question 47: Select-Object cmdlet is used to __________.
Answer: Display the list of objects based on the selected property
Question 48: To run ".PS1" files, the execution policy must be set to __________.
Answer: Remote Signed
Question 49: Shell is _______ that is used to pass commands to the OS.
Answer: cmd interpreter
Question 50: What is the command to list out the files and folders in the directory?
Answer: Get-Childitem
Question 51: PowerShell command is in ___________________ format.
Answer: Verb-Noun format
Question 52: Alias commands are ______________________.
Answer: External Commands
Post a comment
Get your FREE PDF on "100 Ways to Try ChatGPT Today"
Generating link, please wait for: 60 seconds
Comments
Join the conversation and share your thoughts! Leave the first comment.