Unable to run the Graph command in Powershell

Jane doe 0 Reputation points

I'm unable to run the command for


Getting this Error PFA.

$OnPremSync = Get-MgDirectoryOnPremiseSynchronization

$OnPremSync.Features.CloudPasswordPolicyForPasswordSyncedUsersEnabled = $true

Update-MgDirectoryOnPremiseSynchronization `

-OnPremisesDirectorySynchronizationId $OnPremSync.Id `

-Features $OnPremSync.Features

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,581 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,850 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,050 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,459 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 10,360 Reputation points MVP

    Install Microsoft.Graph.Identity.DirectoryManagement module



    0 comments No comments