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 3 years and 2 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.
Hi, I need to start a Job and execute Get-Recipient . I can connect to Exchange, but how do I pass the Exchange session to the Job. Currently it fails on the session.
You also have to detect errors and decide what to do with them.
You cannot use Invoke Command with a job. A job just takes a script block that contains the code to be executed.
help start-job -online - read all of the help until you have a clear idea of how jobs work. You can also search for numerous exampkles of how to use this command.
This topic is 3 years and 2 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.