Start-ProgramAs
PackageDeployment Module Help |
Package Deployment Module |
Start-ProgramAs Cmdlet |
Version 4.0.0.5 |
Start-ProgramAs
Synopsis
Execute program under other logon as
Syntax
Start-ProgramAs [-FilePath] <String> [[-Arguments] <String>] [[-OnError] <String>] [[-Context] <String>] [[-WorkingDirectory] <String>] [-ContinueOnError] [-LeastPrivilege] [-PassThru] [-SecureParameters] [-SignedExitCode] [-Wait] [-Wow64] [[-ExitCodeVariable] <String>] [[-MaxWaitMinutes] <String>] [[-WindowStyle] <String>] [[-RunAs] <String>] [[-UserName] <String>] [[-Password] <String>] [[-Logon] <String>] [<CommonParameters>]
Description
Executes an application using an account other than the currently logged on user account. This ensures, for example, that an application can be executed with more permissions than the current logon allows. In contrast to RunAs the command RunAsEx additionally allows you to specify a return value which can be processed subsequently in the eScript.
Parameters
-Arguments <String> |
||||||
These parameters are transferred to the application |
||||||
|
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-ExitCodeVariable <String> |
||||||
#TODO# |
||||||
|
-FilePath <String> |
||||||
Name of the application to be executed. |
||||||
|
-LeastPrivilege <SwitchParameter> |
||||||
#TODO# |
||||||
|
-Logon <String> |
||||||
NoProfile: The user profile is not loaded. No changes are written into the user profile after the application has been executed. |
||||||
|
-MaxWaitMinutes <String> |
||||||
The package is resumed after the amount of time entered, even if the application has not yet been terminated. |
||||||
|
-OnError <String> |
||||||
Done: Package is resumed with the next command. |
||||||
|
-PassThru <SwitchParameter> |
||||||
#TODO# |
||||||
|
-Password <String> |
||||||
The password for the selected user account |
||||||
|
-RunAs <String> |
||||||
UserName: The application is executed using the account information entered. |
||||||
|
-SecureParameters <SwitchParameter> |
||||||
The command or the variable are not written to log file. Use this option if you do not want the installation parameters or the password, for example, to be read out from the variable. |
||||||
|
-SignedExitCode <SwitchParameter> |
||||||
#TODO# |
||||||
|
-UserName <String> |
||||||
The user account under which the application is to be executed. |
||||||
|
-Wait <SwitchParameter> |
||||||
The package is only resumed when the application has been terminated. |
||||||
|
-WindowStyle <String> |
||||||
Normal: The application window of the executed program is displayed (Normal mode) |
||||||
|
-WorkingDirectory <String> |
||||||
#TODO# |
||||||
|
-Wow64 <SwitchParameter> |
||||||
By default, the PackageDeployment module assumes to run in a 64-bit PowerShell process on 64-bit systems, and therefore defaults to the 64-bit application location (if different from the 32-bit application location) for file and registry accesses. If you want to access the 32-bit counterparts (in the file system %WinDir%\SysWOW64 instead of %WinDir%\System32, in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node instead of HKEY_LOCAL_MACHINE\SOFTWARE), use the -Wow64 switch. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |