You need to test you script using the local system account. https://www.recastsoftware.com/resources/how-to-access-the-local-system-account/
Uninstall 3D Viewer
Trying to remove 3D viewer from end user machines thru powershell with the following:
Get-AppxPackage -allusers Microsoft.Microsoft3DViewer* | Remove-AppxPackage
It works manually but not in system context when deploying the script from SCCM. Am I missing something obvious? Or is there just an easier/different way to go about this?
Windows for business Windows Server User experience PowerShell
Microsoft Security Intune Configuration Manager Other
Windows for business Windows Client for IT Pros User experience Other
2 answers
Sort by: Most helpful
-
-
Simon Ren-MSFT 40,341 Reputation points Microsoft External Staff
2023-09-20T07:12:21.2666667+00:00 Hi,
Agree with Garth. This issue may be related to the running context. We can use PsExec.exe to run the package/program under a specified credential. For more detailed information, please refer to:
How to Access the Local System Account
MDT/SCCM 2010 - Running Applications Installations under different credentials
Hope it helps. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.