F5F Stay Refreshed Software Operating Systems I can assist with PowerShell scripts in PS1 format. Let me know what you need help with!

I can assist with PowerShell scripts in PS1 format. Let me know what you need help with!

I can assist with PowerShell scripts in PS1 format. Let me know what you need help with!

P
pikkon128
Member
164
12-27-2023, 04:28 AM
#1
Hi there. I see you're trying to automate deleting old backup files using PowerShell. The issue might be with how the script is being run or scheduled. Make sure the PowerShell execution policy allows it—unrestricted should work, but double-check your settings. Also, ensure the path you're targeting exists and has the right permissions. If you're using Task Scheduler, confirm the script file is correctly set up and the schedule is valid. Let me know if you need help adjusting the command or permissions!
P
pikkon128
12-27-2023, 04:28 AM #1

Hi there. I see you're trying to automate deleting old backup files using PowerShell. The issue might be with how the script is being run or scheduled. Make sure the PowerShell execution policy allows it—unrestricted should work, but double-check your settings. Also, ensure the path you're targeting exists and has the right permissions. If you're using Task Scheduler, confirm the script file is correctly set up and the schedule is valid. Let me know if you need help adjusting the command or permissions!

I
Ice3Boy
Member
230
12-27-2023, 10:50 AM
#2
PowerShell scripts should be launched by right-clicking and selecting "run with powershell". For scheduling via the task scheduler, configure it to execute powershell.exe and add the following argument: -f "C:\Scripts\MyPSScript.ps1" (adjust the path accordingly).
I
Ice3Boy
12-27-2023, 10:50 AM #2

PowerShell scripts should be launched by right-clicking and selecting "run with powershell". For scheduling via the task scheduler, configure it to execute powershell.exe and add the following argument: -f "C:\Scripts\MyPSScript.ps1" (adjust the path accordingly).

O
OmqDace
Posting Freak
798
12-27-2023, 10:56 AM
#3
Issue occurs when double-clicking the PS1 file, but the backup remains intact. The PowerShell window appears briefly and vanishes without performing any action.
O
OmqDace
12-27-2023, 10:56 AM #3

Issue occurs when double-clicking the PS1 file, but the backup remains intact. The PowerShell window appears briefly and vanishes without performing any action.

G
godzillaslime
Member
177
01-12-2024, 05:21 AM
#4
Writes something clearer while keeping the original intent.
pause
G
godzillaslime
01-12-2024, 05:21 AM #4

Writes something clearer while keeping the original intent.
pause