How to run PowerShell script from CMD

How to run PowerShell script from CMD

  • Comments 2

You will find below example how to run PowerShell script from CMD or in windows schedule task

1C:\>powershell "& 'c:\scripts\Active Directory\CreateNewUser.ps1'"
Comments
  • OK, thanks for posting, but for completeness I think you should post an example with parameters and another with parameters that include apostrophes and quotes.

  • Thanks for your feedback

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post