This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am attempting to use start-process on a virtual machine that is imported within the same script. However the process seems to not start until the virtual machine has been logged in at least once. If I manually login and try running the script remotely again the process will successfully execute.
I believe I ran into this a few years ago for a different project but don't remember if I ever found a fix for it. The command I am executing looks similar to the following -
Invoke-Command -Session $session -ScriptBlock {Start-Process "C:\Temp\myprocess.cmd"}
Any help would be greatly appreciated on this issue.
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PowerShell/...