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

: Navigate to your folder in PowerShell and type: .\script.ps1 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 For more advanced automation, you can find over

Utilizamos cookies próprios e de terceiros para lhe oferecer uma melhor experiência e serviço.
Para saber que cookies usamos e como os desativar, leia a política de cookies. Ao ignorar ou fechar esta mensagem, e exceto se tiver desativado as cookies, está a concordar com o seu uso neste dispositivo.