Customize Script
Use AI to customize Check Disk Space for your specific needs
Describe Your Customization
Tell the AI how you want to modify the script. Be specific about your requirements.
Original Script
Reference the original script while customizing
PowerShell
1param(2 [int]$ThresholdPercent = 803)45Get-WmiObject Win32_LogicalDisk -Filter "DriveType=3" | ForEach-Object {6 $usedPercent = [math]::Round((($_.Size - $_.FreeSpace) / $_.Size) * 100, 2)7 $status = if ($usedPercent -ge $ThresholdPercent) { "WARNING" } else { "OK" }8 9 [PSCustomObject]@{10 Drive = $_.DeviceID11 SizeGB = [math]::Round($_.Size / 1GB, 2)12 FreeGB = [math]::Round($_.FreeSpace / 1GB, 2)13 UsedPercent = $usedPercent14 Status = $status15 }16}Customized Script
Your customized script will appear here
Describe your customization and click "Customize" to generate
Customization Tips
- •Be specific about file paths, server names, or other variables
- •Mention any error handling or logging requirements
- •Specify output format preferences (CSV, JSON, etc.)
- •Include any scheduling or automation requirements