PowerShell | Fresco Play

PowerShell | Fresco Play

Monday, May 22, 2023
~ 5 min read
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

Comments

Join the conversation and share your thoughts! Leave the first comment.

Get your FREE PDF on "100 Ways to Try ChatGPT Today"

Generating link, please wait for: 60 seconds

Checkout all hot deals now šŸ”„

Search blogs

No blog posts found