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

  • Home
  • SEARCH
  • 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 8417443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:03:01+00:00 2026-06-10T02:03:01+00:00

EDIT::::See very bottom for current state of issue. In the current set up, a

  • 0

EDIT::::See very bottom for current state of issue.

In the current set up, a batch file calls a powershell script with the following

powershell D:\path\powershellScript.v32.ps1 arg1 arg2 arg3 arg4

I would like to convert this into a powershell script calling another powershell. However, I’m having issues using start process. This is what I currently have but upon execute I get the following

No application is associated with the specified file for this operation

This is the powershell that is executing

$powershellDeployment = "D:\path\powershellScript.v32.ps1"
$powershellArguments = "arg1 arg2 arg3 arg4"
Start-Process $powershellDeployment -ArgumentList $powershellArguements -verb runas -Wait

EDIT::::::

Due to the help below, I now have the following

$username = "DOMAIN\username"
$passwordPlainText = "password"     
$password = ConvertTo-SecureString "$passwordPlainText" -asplaintext -force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username,$password

$powershellArguments = "D:\path\deploy.code.ps1", "arg1", "arg2", "arg3", "arg4"
Start-Process "powershell.exe" -credential $cred  -ArgumentList $powershellArguments

However, when I execute this script from a remote machine I get “access denied” errors, even though the username used has full administrator access to the machine

  • 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-06-10T02:03:03+00:00Added an answer on June 10, 2026 at 2:03 am

    You should be using Start-Process powershell.exe, and passing the path to the script as the -File argument in your arg list. The No application... bit means that you don’t have a default application set to work with .ps1 files on your machine. If you do the whole Right Click -> Open With -> Select Application -> check "Use this program as default..." tidbit on any .ps1 file, then the message goes away. My default program is notepad, so when I use Start-Process on a .ps1, it pops it up in that.

    Edit:

    To put it all together…

    Start-Process powershell.exe -ArgumentList "-file C:\MyScript.ps1", "Arg1", "Arg2"
    

    Or, if you define $powershellArguments as Keith says ($powershellArguments = "-file C:\MyScript.ps1", "arg1", "arg2", "arg3", "arg4"), then like this:

    Start-Process powershell.exe -ArgumentList $powershellArguments
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Intro: EDIT: See solution at the bottom of this question (c++) I have a
Please see bottom edit for where I am currently at, thank you. I have
Scroll to the bottom, EDIT 19 onwards. See @Chris's comments also for good examples
EDIT: See my answer below--> I am wanting to have a view that when
EDIT: See this in action here: http://jsbin.com/emobi/5 -- and that's using mouseenter/mouseleave. I have
EDIT: I see why it doesn't run twice. I have the Ajax.BeginForm() call inside
I have a Controller with two Edit methods (see below). When I submit the
PLEASE SEE THE EDIT BELOW, THE REPORT SEEMS TO USE CACHED DATA? I cant
EDIT: You can see the search box live here . Before I explain, let
This question was initially misphrased, see the EDIT below. I'll leave it up for

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.