MEA Center of Expertise

We are a 120+ technology enthusiasts helping Microsoft customers around Middle-East & Africa region. We bridge Microsoft tools & technologies to their businesses.

How to run PowerShell script from CMD

How to run PowerShell script from CMD

  • Comments 2
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment