Forum Discussion

aruncherian95's avatar
aruncherian95
Copper Contributor
Aug 09, 2023
Solved

New-ApplicationAccessPolicy

Any idea if this cmdlet has been retired or replaced by RBAC, I'm trying to execute this command but I'm getting the not recognized error in Powershell. Please suggest if I'm missing any modules which needs to be installed prior to execution. thanks in advance

  • LainRobertson's avatar
    LainRobertson
    Aug 09, 2023

    aruncherian95 

     

    The command to check is:

     

    (Get-ManagementRole -Cmdlet New-ApplicationAccessPolicy).Name |
        ForEach-Object {
            Get-ManagementRoleAssignment -Role $_ -Delegating:$false | Format-Table -AutoSize Role, RoleAssigneeType, RoleAssigneeName;
        }

     

    The output of which is:

     

     

    So, to answer your question: to be able to run New-ApplicationAccessPolicy in a default environment, the account you're signing in with needs to be a member of Exchange's "Organization Management" role.

     

    Cheers,

    Lain

    • aruncherian95's avatar
      aruncherian95
      Copper Contributor

      LainRobertson thanks for the quick response, as you suggested I ran the following commands. Now how would I know which role I require to execute the New-ApplicationAccessPolicy cmdlet. Sorry I'm new to powershell and thankyou very much for the help.

       

       

      • LainRobertson's avatar
        LainRobertson
        Silver Contributor

        aruncherian95 

         

        The command to check is:

         

        (Get-ManagementRole -Cmdlet New-ApplicationAccessPolicy).Name |
            ForEach-Object {
                Get-ManagementRoleAssignment -Role $_ -Delegating:$false | Format-Table -AutoSize Role, RoleAssigneeType, RoleAssigneeName;
            }

         

        The output of which is:

         

         

        So, to answer your question: to be able to run New-ApplicationAccessPolicy in a default environment, the account you're signing in with needs to be a member of Exchange's "Organization Management" role.

         

        Cheers,

        Lain

Resources