Partager via


How to run PowerShell script from CMD

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

 1

C:\>powershell ``"& 'c:\scripts\Active Directory\CreateNewUser.ps1'"

Comments

  • Anonymous
    January 01, 2003
    Thanks for your feedback

  • Anonymous
    April 25, 2011
    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.