Script.ps1 May 2026

: Open a text editor like Notepad or Visual Studio Code , paste the code above, and save it as script.ps1 .

# script.ps1 # Simple script to greet the user and check system resources Clear-Host $CurrentTime = Get-Date -Format "HH:mm" Write-Host "Hello! It is currently $CurrentTime." -ForegroundColor Cyan Write-Host "`nTop 5 Memory-Intensive Processes:" -ForegroundColor Yellow Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 5 | Format-Table Name, @Label="Memory (MB)"; Expression=[math]::Round($_.WorkingSet64 / 1MB, 2) Use code with caution. Copied to clipboard script.ps1

: By default, Windows may block scripts for security. To allow them, open PowerShell as an Administrator and run: Set-ExecutionPolicy RemoteSigned : Open a text editor like Notepad or

This piece of code clears the console, says hello, and lists the top 5 most memory-intensive processes currently running. powershell Copied to clipboard : By default, Windows may

: Navigate to your folder in PowerShell and type: .\script.ps1

For more advanced automation, you can find over 600 free scripts on the PowerShell GitHub repository or follow official guides at Microsoft Learn . How to write and run your first PowerShell script - PDQ

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny