Ask your PowerShell-related questions, including questions on cmdlet development!
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 topic is 5 years and 10 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.
Thank you in advance, this forum has been awesome for support questions.
Scenario: created a script and want it to run as a service
Issue: The service starts fine, while its running it does not seem to be doing the while / do code, i would expect entries in the log file. I do not know why the while /do loop well appears not to be running. Any help would be great, Thanks Dana
You're using both the New-SSHSession and the Invoke-SSHCommand. But, I don't see using the -sshsession parameter in the Invoke-SSHCommand to connect to the ssh session created in with the "New-SSHSession".
Sorry! I realized you're using the -SessionId 0 to connect.
I changed the echo to write output and now it shows me the information when I run this deployed as an exe, I get log entries while in the do / while block all good. Thank you
I then deploy as a service as the would be final step for testing, and nothing happens.
I was wondering if someone had a very simple example of a working script that is deployed as a service that is working with a do / while or something like that in it that i could view.
This topic is 5 years and 10 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.