Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This forum is a space to discuss coding involving Graphical User Interfaces (GUI) in PowerShell or using WinForms controls, and technical issues related to development.
This topic is 1 year and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.232
OS: Windows 11.0.22631
PS Version(s): 5.1.22621.1, 7.4.2
I have this simple code. the $statusbar text only works outside of the Invoke-Command -Scriptblock. Why? I need to have a few commands run within the Invoke-Command that run on the remote machine, where $PC=$PCNameBox.Text can be any system in your environment that you have access too. But so far nothing within the Invoke-Command runs.
So far not even ChatGPT can write code that works the way I need. I have the computer name field ($PC) which can be any computer in your Org. I need to run cmd.exe on the remote $PC. so it has to run CMD /c " then an .EXE that is on the remote machine" . <<<< yes this .exe is on my remote machines.
Start-Process only works on my local machine. And so far all of the code snippets ChatGPT has given me fail. i.e. running Invoke-Command and passing it the $PC and the commands to run on the remote machine.
Any help is greatly appreciated.
This topic is 1 year and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.