Quantcast
Channel: Call Powershell from VBA
Viewing all articles
Browse latest Browse all 17

Call Powershell from VBA

$
0
0

Try this.

Sub Test() Dim retval As Variant Dim psCmd As String psCmd = "Powershell -noprofile -ExecutionPolicy RemoteSigned &'C:\temp\copy.ps1'" Debug.Print psCmd retval = Shell(psCmd, vbNormalFocus) End Sub

'copy.ps1 'Copy-Item -Path 'C:\temp\iso\*.img' -Destination 'C:\temp\iso2\' -recurse -Force -Verbose



Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>