Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Batch files are generally executed by CMD.EXE; PowershellPowerShell is executeexecuted by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batchbatch. You might find it useful to look at some of Microsoft's PowerShell basics.

Batch files are generally executed by CMD.EXE; Powershell is execute by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batch. You might find it useful to look at some of Microsoft's PowerShell basics.

Batch files are generally executed by CMD.EXE; PowerShell is executed by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not batch. You might find it useful to look at some of Microsoft's PowerShell basics.

added 4 characters in body
Source Link
Abdul Rasheed
  • 6.8k
  • 4
  • 36
  • 50

Batch files are generally executed by CMD.EXE;CMD.EXE; Powershell is execute by PowerShell.exePowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batch. You might find it useful to look at some of Microsoft's PowerShell basics.

Batch files are generally executed by CMD.EXE; Powershell is execute by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batch. You might find it useful to look at some of Microsoft's PowerShell basics.

Batch files are generally executed by CMD.EXE; Powershell is execute by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batch. You might find it useful to look at some of Microsoft's PowerShell basics.

Source Link
Jeff Zeitlin
  • 11k
  • 2
  • 26
  • 38

Batch files are generally executed by CMD.EXE; Powershell is execute by PowerShell.exe. The two are different, and scripts that work in one will not work in the other. The code that you've pasted into your question is unquestionably PowerShell, not Batch. You might find it useful to look at some of Microsoft's PowerShell basics.