Intune Detection Rule - PowerShell

Ranjithkumar Duraisamy 231 Reputation points
2024-04-01T14:02:11.0833333+00:00

New Microsoft Teams install/uninstall through Intune Win32. Trying to detect install/uninstall completion with powershell script which sounds like strange to me! Honestly, ConfigMgr is very handy while intune way is so complex. (`:

User's image

If(Test-path 'C:\Program Files\WindowsApps\MSTeams*')
{
write-Host 'Installed'
Exit 0
}
else
{
write-host 'Uninstalled'
Exit 0
}

User's image

I have tried many other options but the above one was the last tried detection script. Can someone please correct the script if it's still wrong?

Microsoft Security | Intune | Application management
0 comments No comments
{count} votes

Answer accepted by question author
  1. ZhoumingDuan-MSFT 17,350 Reputation points Microsoft External Staff
    2024-04-02T01:55:52.6966667+00:00

    @Ranjithkumar Duraisamy, Thanks for posting in Q&A.

    From your description, I know you want to deploy New Microsoft Teams via Intune but got some problem.

    Based on my research, to deploy New Microsoft Teams app through Intune, we need to download the app, install/uninstall and detection scripts, then we can package these up and upload them to Intune and deploy it through Intune.

    Here is a link with detailed app download link and PowerShell scripts you can refer.

    https://cloudinfra.net/deploy-new-microsoft-teams-app-on-windows-using-intune/#:~:text=Deploy%20New%20Microsoft%20Teams%20App%20on%20Windows%20using,Win32%20App%20Deployment%20for%20New%20Teams%20App%20

    Non-official, just for reference.

    If there is any unclear, feel free to let me know.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ranjithkumar Duraisamy 231 Reputation points
    2024-04-02T05:57:28.47+00:00

    Thank you. That helped to understand the detection rule.


Your answer

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