Powershell Exit Problem via Batch File


hello,

i'm hoping have simple problem solve. have requirement run a powershell command via java code provision exchange mailboxes accounts.  if create batch file run command it leaves process in powershell , need exit dos on completion.

the command :
powershell.exe -psconsolefile "c:\program files\microsoft\exchange server\bin\exshell.psc1" -noexit -command ". enable-mailbox <account id> '<exchange database>'

i'm wondering if else has had deal scenrio such this? if add second line batch file has "exit" in (to exit ps) doesn't work.

many in advance pointers.

jay.

remove -noexit , exit when finished.


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client