exam questions

Exam SC-300 All Questions

View all questions & answers for the SC-300 exam

Exam SC-300 topic 2 question 79 discussion

Actual exam question from Microsoft's SC-300
Question #: 79
Topic #: 2
[All SC-300 Questions]

DRAG DROP
-

You have an Azure subscription that is linked to an Azure AD tenant named contoso.com. The subscription contains a group named Group1 and a virtual machine named VM1.

You need to meet the following requirements:

• Enable a system-assigned managed identity for VM1.
• Add VM1 to Group1.

How should you complete the PowerShell script? To answer, drag the appropriate cmdlets to the correct targets. Each cmdlet may be used once, more than once or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
cgonIT
Highly Voted 1 year, 2 months ago
Seems to be correct. - Get-AzVM - Get-AzADServicePrincipal
upvoted 7 times
...
penatuna
Most Recent 8 months, 3 weeks ago
Enable system-assigned managed identity on an existing Azure VM: 1. Retrieve the VM properties using the Get-AzVM cmdlet. Then to enable a system-assigned managed identity, use the -IdentityType switch on the Update-AzVM cmdlet: $vm = Get-AzVM -ResourceGroupName myResourceGroup -Name vm1 Update-AzVM -ResourceGroupName myResourceGroup -VM $vm -IdentityType SystemAssigned
upvoted 3 times
penatuna
8 months, 3 weeks ago
Add VM system assigned identity to a group: After you have enabled system assigned identity on a VM, you can add it to a group. The following procedure adds a VM's system assigned identity to a group. 1. Retrieve and note the ObjectID (as specified in the Id field of the returned values) of the VM's service principal: $displayname = Get-AzADServicePrincipal -displayname "vm1" 2. Retrieve and note the ObjectID (as specified in the Id field of the returned values) of the group: $group Get-AzADGroup -searchstring "group1" 3. Add the VM's service principal to the group: Add-AzureADGroupMember -ObjectId $group.id -RefObjectId $displayname.id https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/qs-configure-powershell-windows-vm#system-assigned-managed-identity
upvoted 2 times
...
...
Studytime2023
1 year ago
Correct. https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/qs-configure-powershell-windows-vm
upvoted 3 times
...
DasChi_cken
1 year, 1 month ago
Its correct, you want to save the Powershell objects in a variable first and Last step is Putting all things together
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...