Forum Discussion

matthewrosier's avatar
matthewrosier
Copper Contributor
Jan 02, 2025
Solved

Local admin creds via Powershell via Intune

Hello!

I have what I hope is a fairly simple question. I am trying to run the Winget upgrade process using a Powershell script deployed in Intune. The problem is that it fails on laptops because it requires elevated privileges. It works for those who are local admins but not for those who are not. Has anyone deployed this successfully? Using the command below in the PS1 file....

winget upgrade -h --all

Or as an alternative, has anyone any good advice running Winget from Intune across all users within a specific security group? Thanks all!

  • Yes, tho it is not easy. I cannot provide the code but it can be done.

    There are obvious security implications, and various problems but winget is not really designed to operate in this manner tho it would be a great feature.

  • miketobin007's avatar
    miketobin007
    Copper Contributor

    Yes, tho it is not easy. I cannot provide the code but it can be done.

    There are obvious security implications, and various problems but winget is not really designed to operate in this manner tho it would be a great feature.

Resources