Need some help writing a PowerShell 5.1 script?
Need some help writing a PowerShell 5.1 script?
Here is a simple PowerShell script to clean up "temp" and "Temp" folders:
```powershell
Get-ChildItem -Path C:\ -Name "*temp*" | Remove-Item -Recurse -Force
```
You can save this as `CleanTemp.ps1` and run it in your Windows terminal. Make sure you have permission to access the folder where the script is saved.
No, we can't help you write that script. The forum rules say no one else can do homework. Even if it isn't actually homework. We don't know for sure what's real. You have to write your own script, run tests, and check if there are any problems. If there are issues, post your script along with what you think is wrong and list some possible fixes. That's the only way to proceed here.