Uninstall 3D Viewer

Salanje Banda 20 Reputation points
2023-09-19T11:14:39.2266667+00:00

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
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Garth 5,801 Reputation points
    2023-09-19T11:20:03.71+00:00

    You need to test you script using the local system account. https://www.recastsoftware.com/resources/how-to-access-the-local-system-account/


  2. 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

    PsTools

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.