Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 546763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:54:05+00:00 2026-05-13T10:54:05+00:00

How do I run a PowerShell script? I have a script named myscript.ps1 I

  • 0

How do I run a PowerShell script?

  • I have a script named myscript.ps1
  • I have all the necessary frameworks installed
  • I set that execution policy thing
  • I have followed the instructions on this MSDN help page
    and am trying to run it like so:
    powershell.exe 'C:\my_path\yada_yada\run_import_script.ps1' (with or without --noexit)

which returns exactly nothing, except that the file name is output.

No error, no message, nothing. Oh, when I add -noexit, the same thing happens, but I remain within PowerShell and have to exit manually.

The .ps1 file is supposed to run a program and return the error level dependent on that program’s output. But I’m quite sure I’m not even getting there yet.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:54:05+00:00Added an answer on May 13, 2026 at 10:54 am

    Prerequisites:

    • You need to be able to run PowerShell as an administrator
    • You need to set your PowerShell execution policy to a permissive value or be able to bypass it

    Steps:

    1. Launch Windows PowerShell as an Administrator, and wait for the PS> prompt to appear

    2. Navigate within PowerShell to the directory where the script lives:

      PS> cd C:\my_path\yada_yada\ (enter)
      
    3. Execute the script:

      PS> .\run_import_script.ps1 (enter)
      

    Or: you can run the PowerShell script from the Command Prompt (cmd.exe) like this:

    powershell -noexit "& ""C:\my_path\yada_yada\run_import_script.ps1""" (enter)
    

    according to Invoking a PowerShell script from cmd.exe (or Start | Run) by Kirk Munro.

    Or you could even run your PowerShell script asynchronously from your C# application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a complex Powershell script that gets run as part of a SQL
I have developed a Powershell script that needs to be run automatically daily. This
I am have a powershell script that does a few things that all need
I have a PowerShell script that is run automatically when our monitoring service detects
I have a powershell script ( setup.ps1 ), that we use as the entry
I have created a Powershell script and set it up to run within a
I have a PowerShell script that needs to run under multiple hosts (PowerGUI, PowerShell
I am trying to run a PS1 script using Exchange 2010 remote powershell and
I have a question i wrote a powershell script so i have name.ps1, but
I have a nice powershell script that automates a particular website for my daughter.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.