---
title: "Discussion on \"Get all Intune policies using PowerShell and Graph API\" | Hashnode"
description: "Discussion on \"Get all Intune policies using PowerShell and Graph API\". For my new PowerShell function Search-IntuneAccountPolicyAssignment (for searching Intune policies assigned to selected account) I was in need to have a list of all these policies so I can search through them. For this reason, I have created a functi..."
url: "https://hashnode.com/posts/get-all-intune-policies-using-powershell-and-graph-api/6346bd82ee0a118e13cc412d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Get all Intune policies using PowerShell and Graph API](https://doitpshway.com/get-all-intune-policies-using-powershell-and-graph-api?utm_source=hashnode&utm_medium=feed)

For my new PowerShell function Search-IntuneAccountPolicyAssignment (for searching Intune policies assigned to selected account) I was in need to have a list of all these policies so I can search through them. For this reason, I have created a functi...

Oct 12, 2022 · 3 min read · doitpshway.com  
Updated Oct 19, 2022  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#intune](https://hashnode.com/tag/intune)

## Written by

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

@AndrewZtrhgf · Czech Republic

  
[View profile](https://hashnode.com/@AndrewZtrhgf)

System Administrator that loves PowerShell

I work as System Administrator for more than 15 years now and I love to make my life easier by automating work &amp; personal stuff via PowerShell (even silly things like food recipes list generation).

## Responses 1

Markdown supported · ⌘↵ to post

[Steve Oliver](https://hashnode.com/@skoliver1)

[Jun 14, 2023](https://hashnode.com/posts/get-all-intune-policies-using-powershell-and-graph-api/6346bd82ee0a118e13cc412d/comment/6489d4e892942eb88291b2e7)

This looks very useful but I get an error when installing the IntuneStuff module.

"Import-Module : AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook."

I've found that the AzureRM module is an older module, but I cannot uninstall it because it is a dependency of IntuneStuff.

[Steve Oliver](https://hashnode.com/@skoliver1)

[Jun 14, 2023](https://hashnode.com/posts/get-all-intune-policies-using-powershell-and-graph-api/6346bd82ee0a118e13cc412d/comment/6489d4e892942eb88291b2e7#reply-6489e0cb2ec2d2bb12a3bbc0)

Actually, this was for the latest version, 1.4.0. I saw that 1.3.0 had lots more downloads so I installed that one instead and it works great.

Thank you for this!
