शुरुआती लोगों के लिए PowerShell का उपयोग कैसे करें
PowerShell Windows का शक्तिशाली command-line interface है जो आपको system को control करने और automation tasks perform करने की सुविधा देता है। यह Command Prompt से ज्यादा advanced features प्रदान करता है और modern Windows systems का हिस्सा है।
- PowerShell को खोलें. Start menu पर click करें और 'powershell' type करें। Windows PowerShell पर right-click करें और 'Run as administrator' select करें। अगर UAC prompt आए तो 'Yes' click करें। Blue background वाला PowerShell window खुल जाएगा।
- Basic navigation commands सीखें. Current directory देखने के लिए 'pwd' या 'Get-Location' type करें। Directory change करने के लिए 'cd' command का उपयोग करें, जैसे 'cd C:\Users'। Files और folders की list देखने के लिए 'dir' या 'Get-ChildItem' type करें।
- File operations perform करें. नई file बनाने के लिए 'New-Item -ItemType File -Name filename.txt' use करें। File को copy करने के लिए 'Copy-Item source.txt destination.txt' command दें। File delete करने के लिए 'Remove-Item filename.txt' type करें।
- System information प्राप्त करें. Computer की detailed information के लिए 'Get-ComputerInfo' command run करें। Running processes देखने के लिए 'Get-Process' type करें। Network configuration check करने के लिए 'Get-NetIPAddress' का उपयोग करें।
- Help system का उपयोग करें. किसी भी command की help देखने के लिए 'Get-Help command-name' type करें। Detailed examples के लिए 'Get-Help command-name -Examples' use करें। Available commands की list देखने के लिए 'Get-Command' run करें।
- Command history manage करें. Previous commands देखने के लिए Up और Down arrow keys का उपयोग करें। Current session की पूरी command history देखने के लिए 'Get-History' type करें। Screen clear करने के लिए 'cls' या 'Clear-Host' command run करें।
- Basic scripts बनाएं. Notepad में simple commands लिखकर .ps1 extension से save करें। Script run करने से पहले execution policy set करें: 'Set-ExecutionPolicy RemoteSigned'। Script को run करने के लिए '.\scriptname.ps1' type करें।