How do I do this thru PowerShell? can someone share how to do this thru Invoke-RestMethod if the cmdlets aren't there yet?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
There is a 3rd party blog that shows how to do it using PowerShell. All this is really doing is setting the extension so using PowerShell should work fine
https://blog.azureandbeyond.com/2018/07/31/aad-login-linux/
We currently just have the official doc using CLI. This is partly because this feature is in preview so once it moves into GA more examples will be added. And also, since this is specific to Linux VMs we find that most users working with Linux VMs are more familiar with CLI so that is why we went with a CLI example to start with.
@Ayanmullick I will close for now. Thank you again for all the feedback you give on the docs. It really does help us prioritize and improve them.
I have made sure to send this feedback to the product teams as well and as we move out of preview you will see more examples :)
I had to use the objectid instead of the signin name since I was using a live id. But it works.
Set-AzureRmVMExtension -Publisher Microsoft.Azure.ActiveDirectory.LinuxSSH -Name AADLoginForLinux -ResourceGroupName <> -VMName <> -Location eastus2 -ExtensionType AADLoginForLinux -TypeHandlerVersion 1.0 -Verbose
New-AzureRmRoleAssignment -ObjectId <> -RoleDefinitionName "Virtual Machine Administrator Login" -Scope $scope -Verbose
Thanks for sharing the link.
@MicahMcKittrick-MSFT, The above doesn't create the device in AAD. Is there a separate extension for that?
Not sure what you are referring to. Can you elaborate?