Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save duffney/8dcf10051131a01d75cd712dc1736e95 to your computer and use it in GitHub Desktop.
Save duffney/8dcf10051131a01d75cd712dc1736e95 to your computer and use it in GitHub Desktop.
Code Snippet for become Ansible Chapter 2 pg 18
$credentials = New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property @{ StartDate=Get-Date; EndDate=Get-Date -Year 2024; Password='<Password>'};
$spSplat = @{ DisplayName = 'ansible' ; PasswordCredential = $credentials} ;
$sp = New-AzAdServicePrincipal @spSplat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment