Forum Discussion
Gaurav_Kabra_25
Mar 08, 2016Nimbostratus
Call Powershell Script from Unix Shell Script
Hi All,
Trust you're all having a great day.
I have a powershell script on my Windows server which does some active directory operations. I wish to call that script from another Linux machi...
- Mar 09, 2016
Tried the operation using an "expect" script and it all works well now.
Chris_Grant
Mar 08, 2016Employee
I am assuming you actually have a server after the @. I suspect what's happening is that you are running sleep on the windows server, rather than the \scriptname.ps1 file. Try something like this:
GROUP=$1 ACCOUNT=$2 ssh Administrator@ "\scriptname.ps1 -group $Group -account $ACCOUNT"
SSH should take care of the delay while logging in and the exit on completion of the command natively.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects