System Center Orchestrator and opened sessions from scripts using PowerCLI


Very quick note to myself (if i will ever need to use system center orchestrator) and internet ;). I was helping out today one person on #PowerCLI. His scripts that were being fired up in system center orchestrator did not quit properly. We first wrote quite a long workaround 😉 but after an hour i asked that person to disconnect in different way.
Instead of :
disconnect-viserver -Confirm:$false
i recommended to use:
disconnect-viserver -Confirm:0

And it helped, his scripts no longer exit with errors, and all script sessions are closed after script is finished.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s