Mandy_
asked on
Open Powershell (EMS) command within VBA Excel
hi folks,
could anybody help me to execute the powershell command in excel?
In every excel row is stored a command until "". Is it also possible to
excecute every command in only one powershell session?
could anybody help me to execute the powershell command in excel?
In every excel row is stored a command until "". Is it also possible to
excecute every command in only one powershell session?
Private Sub CommandButton1_Click()
Counter = 4
Do
Dim Command
Command = Worksheets("user").Cells(Counter, 4).Value
Shell ("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit icm -ScriptBlock {"& Command & "})" ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1';Connect-ExchangeServer -auto;"
'-noexit icm -ScriptBlock {"&Command&"})
Counter = Counter + 1
Loop Until Command = ""
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What should i say, again a masterpiece....
thank you so much
thank you so much
Thanks.