JAz.PIM icon indicating copy to clipboard operation
JAz.PIM copied to clipboard

Fixed Error When Using -Wait with Enable-ADRole

Open bmkaiser opened this issue 3 years ago • 0 comments

When using the -Wait parameter with Enable-ADRole, you get an error. This error does not occur when piping Enable-ADRole to Wait-ADRole.

PS > Enable-ADRole 'Global Reader (LJnv8vs6uUa3z6Em7nTEUZY-Uygeo0pJj_wBT3Lkhj8-1-e)' -Justification 'foo' -Wait
Get-JAzADRole: C:\Program Files\PowerShell\Modules\jaz.pim\0.0.8\Public\Wait-ADRole.ps1:142
Line |
 142 |              Get-JAzADRole -Activated
     |              ~~~~~~~~~~~~~
     | The term 'Get-JAzADRole' is not recognized as a name of a cmdlet, function, script file, or executable
     | program. Check the spelling of the name, or if a path was included, verify that the path is correct
     | and try again.

This PR fixes that error by replacing Get-JAzADRole with Get-ADRole within the Wait-ADRole function.

bmkaiser avatar Jul 27 '22 16:07 bmkaiser