PrepAway - Latest Free Exam Questions & Answers

Which Windows PowerShell cmdlet should you run?

A company has an Office 365 tenant that has an Enterprise E1 subscription.
You synchronize disabled user accounts from an Active Directory Domain Services environment.
You need to enable the user accounts in Office 365.
Which Windows PowerShell cmdlet should you run?

PrepAway - Latest Free Exam Questions & Answers

A.
Set-MsolUser

B.
Redo-MsolProvisionUser

C.
Set-MsolUserLicense

D.
Set-MsolUserPrincipalName

E.
Convert-MsolFederatedUser

F.
Set-MailUser

G.
Set-LinkedUser

H.
New-MsolUser

Explanation:

https://msdn.microsoft.com/en-us/library/dn194135.aspx
Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one
question in the series. Each question is independent of the other questions in this series. Information and details provided in the question apply only to
that question.

7 Comments on “Which Windows PowerShell cmdlet should you run?

  1. ExchGuy says:

    I would have gone with A. When you dirsync a disabled user from on premise to Office 365 the user is created in Office 365 with the BlockCredential attribute set to True. The set-msoluser -userprincipalname -BlockCredential $false will enable that account.




    0



    0
    1. Tubby says:

      But would’t the -BlockCredential $false tag change back to $true, the next time that the sync is run?

      I think that you would need to change the UPN before enabling the user so that next time the sync happened it didn’t disable the users again.

      Please advise if my reasoning is flawed.




      0



      0
  2. Bas says:

    I Agree with ExchGuy.

    2.Determine how to update users that were disabled before our change. If you simply want to re/enable all currently disabled accounts, the below PowerShell sample might work well:

    Connect-MsolService
    $BlockedUsers = Get-MsolUser -EnabledFilter DisabledOnly -All
    $i= 1
    $BlockedUsers | ForEach-Object {
    Write-Host ($_.UserPrincipalName + ” (” + $i + ” of ” + $BlockedUsers.count + “)” )
    Set-MsolUser -UserPrincipalName $_.UserPrincipalName -BlockCredential $false
    $i = $i + 1
    }




    0



    0

Leave a Reply