Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

PS won't install msixbundle

I'm trying to deploy a msixbundle via PDQ Deploy with a PowerShell script and it isn't working.

Start-Transcript -Path "C:\transcripts\transcript0.txt" -Append
Add-AppxPackage -Path "C:\Temp\Microsoft.WindowsConfigurationDesigner_2022.1118.0.0.Msixbundle"

The above works just fine if I execute directly on the host but it won't work when using PDQ. The files copy without issue and the logs in PDQ show the start of the transcript but then nothing after. I was only able to get errors from PDQ when adding parameters to the add cmdlet but that didn't help.

I'm thinking the issue may lie in the error handling wrapper scripts but I'm not see a way to resolve. What am I missing?

0

Comments

5 comments
Date Votes
  • Does it work without Start-Transcript?

    0
  • It does not. I added that after it wasn't working to hopefully get something but the following hasn't helped me in the slightest. The script works and installs the application with and without "transcript" when ran locally on the host.

    **********************
    Windows PowerShell transcript start
    Start time: 20230403101113
    Username: TCORE\PDQService
    RunAs User: TCORE\PDQService
    Configuration Name: 
    Machine: BVT00717 (Microsoft Windows NT 10.0.19045.0)
    Host Application: C:\windows\System32\WindowsPowerShell\V1.0\PowerShell.exe -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -Command try{ Invoke-Expression "& '.\Error Handling Wrapper.ps1'"} Catch [System.Management.Automation.PSSecurityException] { $LASTEXITCODE = 37106; Write-Error -Exception $Error[0].Exception } If ($LASTEXITCODE -ne $null) { exit $LASTEXITCODE }
    Process ID: 11884
    PSVersion: 5.1.19041.2673
    PSEdition: Desktop
    PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.2673
    BuildVersion: 10.0.19041.2673
    CLRVersion: 4.0.30319.42000
    WSManStackVersion: 3.0
    PSRemotingProtocolVersion: 2.3
    SerializationVersion: 1.1.0.1
    **********************
    Transcript started, output file is C:\transcripts\transcript0.txt
    PS>$global:?
    True
    **********************
    Windows PowerShell transcript end
    End time: 20230403101116
    **********************
    0
  • Had to mess with the different Run Modes and that fixed the issue.

    1
  • What run mode did you end up on?

    0
  • "Logged on User" did the trick though we needed it installed for all users on the system so we ended up putting it back to the default of "Deploy User (use package setting)" then installed the package with DISM.exe and it worked beautiful.

    1