By using this site, you agree to the Privacy Policy.
Accept
EnterinITEnterinITEnterinIT
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Reading: PowerShell Start-Process Credential error
Font ResizerAa
EnterinITEnterinIT
Font ResizerAa
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
  • WINDOWS
  • SCCM Query Collection List
Search
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
IT Pro

PowerShell Start-Process Credential error

Published: February 18, 2024
2 Min Read
SHARE

PowerShell Start-Process Credential error. In some conditions, you will get an error

The system cannot find the file specified

Or

The Directory name is invalid

The error occurs only if the parameter Credential is set.

Start-Process Credential errors

Start-Process The file cannot find the file. Even with the full path specified, another error occurs: The Directory name is invalid.

Start-Process -credential (Get-Credential) -FilePath "C:\Program Files (x86)\Internet Explorer\iexplore.exe"

The Start-Process cmdlet has the WorkingDirectory parameter. If we use it with the executable name, the error is one again: The system cannot find the file specified.

Start-Process -credential (Get-Credential) -FilePath "iexplore.exe" -WorkingDirectory "C:\Program Files (x86)\Internet Explorer\"

These errors occur when the $HOMEDRIVE  and $HOMEPATH are set on the logged user account. This can be done by GPO or on the account properties.

The workaround is to use the full path of the executable AND uses the working directory:

Start-Process -credential (Get-Credential) -FilePath "C:\Program Files (x86)\Internet Explorer\iexplore.exe" -WorkingDirectory "C:\Program Files (x86)\Internet Explorer\"

When you try to run a process on a computer with an external user in a trusted forest, the user must be in the local computer User group. Otherwise, you will get an Access Denied error.

TAGGED:PowerShellWindowsWindows 10
Previous Article Intune Error 65001: Compliance Policy Not Evaluated
Next Article Ubuntu remove Nvidia Cuda drivers
Leave a Comment Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translation

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
by Transposh - translation plugin for wordpress

Popular Posts

System Requirements for Windows Server 2016
Windows Server
Configuration Manager Query Collection List
Configuration Manager Query Collection List
ConfigMgr
Structured/Managed Navigation enabled on Modern Pages in Classic Team Sites
Tech
SCCM Failed to get DP locations as the expected version from MP
ConfigMgr

Recent Posts

Installing and Configuring Fail2ban for SSH Protection on Ubuntu 24.04
Linux
Enabling and Configuring FirewallD on AlmaLinux
Linux
User Creation and SSH Key Setup in AlmaLinux
Linux
How to reset password on AlmaLinux
Linux

© 2023 EnterinIT

Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?