- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025
08:14 PM
- last edited on
03-18-2025
11:21 AM
by
Obi_1_Cinobi
I have a Poweshell script that if I run it on a machine locally in PS will silently run the Windows 10 to Windows 11 (24H2) upgrade, perform one restart and it's good to go. SO, I KNOW THE PS SCRIPT WORKS. I've attached a snip-it of the script that works locally.
I've saved the Powershell Script in the Package share and set up a deployment job, but it just times out and eventually fails.
This is the job syntax.
powershell.exe -executionpolicy bypass -file "PackageShare}\UpgradetoWin11.ps1"
I have used ChatGPT, LanSweeper and many resources to no avail.
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 09:54 AM
you could try to using the Invoke-command:
powershell.exe -command (Invoke-Command -ScriptBlock {“\\path\to\script.ps1 -argument”})
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 05:15 PM
Worked like a champ. THANK YOU!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I can't seem to get my syntax right.
@Chrisy1963 Can you advise how you used @ErikT 's advice with your already working script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello! What a good idea you have had to update the W10, could you tell me how you did it? We can talk privately. Thanks a lot Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 09:54 AM
you could try to using the Invoke-command:
powershell.exe -command (Invoke-Command -ScriptBlock {“\\path\to\script.ps1 -argument”})
