WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
I'm currently setting up an software deployment tool in our company.
I'd like to use winget to install the newest software and deploy the configuration (if needed) of the requested software by script, but actually that doesn't matter right now.
If I'm the end user and start a installation, the context of the installation will be run by the "NT AUTHORITY\System" user. To get a normal and good connection to the Domain I'm using, I'm starting a PSSession with a specific user. (The user is a local Administrator)
This is a part of the design of MSIX packages. We're developing a separate "in process" COM interface for remote execution under the system account. This is related to:
Brief description of your issue
Hello,
I'm currently setting up an software deployment tool in our company. I'd like to use winget to install the newest software and deploy the configuration (if needed) of the requested software by script, but actually that doesn't matter right now.
If I'm the end user and start a installation, the context of the installation will be run by the "NT AUTHORITY\System" user. To get a normal and good connection to the Domain I'm using, I'm starting a PSSession with a specific user. (The user is a local Administrator)
After that I run the "Change-Active-User" in my main script. To now run the Installation of winget remotely I use the "Invoke-Command" cmdlet:
After all this code, winget is installed.
Steps to reproduce
Install Win-Get as Appx Package, and try to run it through a pssession or a invoke-command or even with the NT Authority\SYSTEM User.
Expected behavior
Now the problem is, If I am the normal Administrator logged in from my test-domain (DOMAIN-NET.int) I can normally run the winget command:
Actual behavior
If I try to run it in the SYSTEM-User context, I get following error:
When I Enter the opened PSSession and am logged it with the domain user (as local admin), I get following error:
And yes the user is local administrator
Environment