Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Application using powershell passing parameter

$
0
0

I have a powershell script that is using functions passing parameters, it works find when running either via powershell ISE or CMD prompt.

I have a policy on the system that is setting powershell to "Bypass" as well as on this test system is set locally to "Unrestricted"

I created and application for it and my testing it fails right away with the below, any thoughts on what I'm doing wrong?  Is it because applications run in the user context?:

++++++ App enforcement completed (0 seconds) for App DT "Citrix Receiver Dormant 4.9" [ScopeId_03C35243-4DA4-4954-8C86-AF4B627EE4BC/DeploymentType_49475f1c-cbcc-4836-9acd-9cfbd55f1031], Revision: 1, User SID: ] ++++++ AppEnforce 7/2/2018 10:27:57 AM 4844 (0x12EC)
+++ Starting Install enforcement for App DT "Citrix Receiver Dormant 4.9" ApplicationDeliveryType - ScopeId_03C35243-4DA4-4954-8C86-AF4B627EE4BC/DeploymentType_49475f1c-cbcc-4836-9acd-9cfbd55f1031, Revision - 2, ContentPath - C:\WINDOWS\ccmcache\o, Execution Context - System AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    A user is logged on to the system. AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Performing detection of app deployment type Citrix Receiver Dormant 4.9(ScopeId_03C35243-4DA4-4954-8C86-AF4B627EE4BC/DeploymentType_49475f1c-cbcc-4836-9acd-9cfbd55f1031, revision 2) for system. AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
+++ Application not discovered. [AppDT Id: ScopeId_03C35243-4DA4-4954-8C86-AF4B627EE4BC/DeploymentType_49475f1c-cbcc-4836-9acd-9cfbd55f1031, Revision: 2] AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    App enforcement environment:
 Context: Machine
 Command line: powershell - file "Citrix_All_In_One_Functions.ps1" -Run "Dormant"
 Allow user interaction: No
 UI mode: 1
 User token: null
 Session Id: 1
 Content path: C:\WINDOWS\ccmcache\o
 Working directory:  AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Prepared working directory: C:\WINDOWS\ccmcache\o AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
Found executable file powershell with complete path C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Prepared command line: "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" - file "Citrix_All_In_One_Functions.ps1" -Run "Dormant" AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Executing Command line: "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" - file "Citrix_All_In_One_Functions.ps1" -Run "Dormant" with user context AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Working directory C:\WINDOWS\ccmcache\o AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Post install behavior is BasedOnExitCode AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Waiting for process 4384 to finish.  Timeout = 120 minutes. AppEnforce 7/2/2018 10:29:59 AM 4844 (0x12EC)
    Process 4384 terminated with exitcode: 4294770688 AppEnforce 7/2/2018 10:30:00 AM 4844 (0x12EC)
    Looking for exit code -196608 in exit codes table... AppEnforce 7/2/2018 10:30:00 AM 4844 (0x12EC)
    Unmatched exit code (4294770688) is considered an execution failure. AppEnforce 7/2/2018 10:30:00 AM 4844 (0x12EC)


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>