Finding Anything in Intune from its name

We’ve all been there, you created that Bitlocker policy (other policies are available) years ago, it’s working fine, but you can’t remember which section you created it in.

You could click around in the portal until you find it, or you could run my latest script:

Install-Script -Name intune-findby-name

Also available on Github here

Simply run intune-findby-name.ps1 -name “App/Script/Policy/Whatever Name”

It will output:
The ID, URI and what it is:

As usual, there is a variable you can switch if you want to use an App Registration and run with automation, or just run manually from the command line.

You could use this to delete policies by calling a DELETE Graph command on the URI or just as a better search option.

It will also be added into the copy-policy script to be able to quickly copy by name rather than using the GUI

Enjoy!

9 thoughts on “Finding Anything in Intune from its name”

  1. Thanks for sharing this. I’ve installed this script and run this multiple times but every attempt results in:

    Installing Microsoft Graph modules if required (current user scope)
    Microsoft Graph Authentication Already Installed
    Welcome To Microsoft Graph!

    Nothing happens.

    When I check the .log file there are a lot of Access Denieds, AccessDenied”,”message”:”You cannot perform the requested operation, required scopes are missing in the token etc. I ‘ve consent all the MS Graph permissions when asked for.

    Reply
  2. I’ve just .\intune-findby-name.ps1 -name “App/Script/Policy/Bitlocker/
    But also tried .\intune-findby-name.ps1 -name “App/Script/Policy/Shared/

    Reply
  3. Tried intune-findby-name.ps1 -name bitlocker and intune-findby-name.ps1 -name chrome.. But nothing. Any advice?

    Reply
  4. That did work. But I was expecting something else. I was expecting something like “equals”. Now it is a requirement to know the exact name of the profile. If you know the exact name of the profile you could go via the portal instead.

    Reply

Leave a Comment