InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner
1. What is PowerShell?
PowerShell is a task automation and configuration management framework developed by Microsoft, built on .NET. It consists of a command-line shell and scripting language.
Beginner
2. What is a cmdlet?
A cmdlet is a lightweight PowerShell command used to perform a specific task. Example: Get-Process, Get-Service.
Beginner
3. What is the difference between PowerShell and Command Prompt?
PowerShell works with objects, while Command Prompt works with text. PowerShell is more powerful and supports scripting and automation.
Beginner
4. How to get help in PowerShell?
Use Get-Help cmdlet. Example: Get-Help Get-Process -Full
Beginner
5. How to list all running processes?
Use: Get-Process
Beginner
6. How to list services?
Use: Get-Service
Beginner
7. What is pipeline in PowerShell?
Pipeline (|) passes output of one command as input to another command.
Beginner
8. How to stop a process?
Stop-Process -Name notepad
Beginner
9. How to create a variable?
$name = "John"
Beginner
10. How to write output to console?
Write-Output "Hello World"
Intermediate
11. What is a script in PowerShell?
A script is a file with .ps1 extension containing PowerShell commands.
Intermediate
12. How to run a script?
.\scriptname.ps1
Intermediate
13. What is Execution Policy?
Execution policy controls script execution permissions. Example: Set-ExecutionPolicy RemoteSigned
Intermediate
14. What are loops in PowerShell?
for, foreach, while, do-while loops are used for iteration.
Intermediate
15. What is foreach loop example?
Answer Here
Intermediate
16. What is a function in PowerShell?
A reusable block of code defined using function keyword.
Intermediate
17. How to define a function?
Answer Here
Intermediate
18. What is an array?
Collection of values. Example: $arr = @(1,2,3)
Intermediate
19. What is a Hashtable?
Answer Here
Intermediate
20. How to filter output?
Answer Here
Advanced
21. What is PowerShell remoting?
Allows running commands on remote computers using WinRM.
Advanced
22. What is Invoke-Command?
Answer Here
Advanced
23. What is a Module?
A package containing cmdlets, functions, workflows, variables.
Advanced
24. How to import a module?
Import-Module ModuleName
Advanced
25. What is error handling?
Using Try, Catch, Finally blocks to handle exceptions.
Advanced
26. Example of Try-Catch?
Answer Here
Advanced
27. What is DSC?
Desired State Configuration is used for configuration management.
Advanced
28. What is a ScriptBlock?
A collection of statements enclosed in used as a unit.
Advanced
29. What is background job?
Run commands asynchronously using Start-Job.
Advanced
30. How to export data to CSV?
Get-Process | Export-Csv processes.csv -NoTypeInformation
Coding Round
31. Reverse a string
$str="hello" -join ($str.ToCharArray() | Reverse)
Coding Round
32. Check if number is even
if($num % 2 -eq 0)Even else Odd
Coding Round
33. Print numbers 1 to 10
Answer Here
Coding Round
34. Find largest number in array
($arr | Measure-Object -Maximum).Maximum
Coding Round
35. Count files in folder
(Get-ChildItem "C:\Test").Count
Coding Round
36. Check if file exists
Test-Path "C:\file.txt"
Coding Round
37. Read file content
Get-Content file.txt
Coding Round
38. Append text to file
Add-Content file.txt "New Line"
Coding Round
39. Get current date
Get-Date
Coding Round
40. Create new folder
New-Item -ItemType Directory -Path "C:\NewFolder"
Coding Round
41. Delete a file
Remove-Item file.txt
Coding Round
42. Sort numbers
$arr | Sort-Object
Coding Round
43. Get top 5 processes by CPU
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5
Coding Round
44. Convert string to uppercase
$str.ToUpper()
Coding Round
45. Replace text in string
$str -replace "old","new"
Coding Round
46. Get system info
Get-ComputerInfo
Coding Round
47. Get IP address
Get-NetIPAddress
Coding Round
48. Schedule a task
Register-ScheduledTask
Coding Round
49. Create CSV from array
$arr | Export-Csv data.csv -NoTypeInformation
Coding Round
50. Get running services only
Answer Here