Start-Process doesn't work with -credential parameter on Windows Server Core

This page summarizes the projects mentioned and recommended in the original post on /r/PowerShell

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ProcessEx

    Exposes the Windows Process creation Win32 functions in PowerShell

  • Using Start-ProcessWith with a -Credential object should work for both running in session 0 (Enter-PSSession) and using the -Wait parameter to wait for it to complete. Unfortunately it will spawn in a new window (which you can hide though). If you want it to run the new process as another user but in the same window you essentially need Start-ProcessEx with a -Token. This allows you to spawn a process in the current terminal but unfortunately the -Token side requires privileges that not even normal Administrators typically have, thus would need to be run as SYSTEM.

  • PowerShell

    PowerShell for every system!

  • I use Start-Sleep here because the -Wait doesn't work with -Credential for the Start-Process - this is a known issue. See https://github.com/PowerShell/PowerShell/issues/17033

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts