PrepAway - Latest Free Exam Questions & Answers

You need to prevent the new users from accessing any of…

Your network contains an Active Directory forest named contoso.com
Your company plans to hire 500 temporary employees for a project that will last 90 days.
You create a new user account for each employee. An organizational unit (OU) named Temp contains the user
accounts for the employees.
You need to prevent the new users from accessing any of the resources in the domain after 90 days.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Run the Get-ADUser cmdlet and pipe the output to the Set-ADUser cmdlet.

B.
Create a group that contains all of the users in the Temp OU. Create a Password Setting object (PSO) for
the new group.

C.
Create a Group Policy object (GPO) and link the GPO to the Temp OU. Modify the Password Policy settings
of the GPO.

D.
Run the GET-ADOrganizationalUnit cmdlet and pipe the output to the Set-Date cmdlet.

3 Comments on “You need to prevent the new users from accessing any of…

  1. davidcertifier says:

    A word of warning, I can’t test this right now, so I’m doing this from memory. I suggest you use the -WhatIf switch when testing.

    First, retrieve all user objects in the Temp OU:
    Get-ADUser -SearchBase ‘OU=Temp, DC=contoso, DC=com’

    Now, set the expiration date 90 days into the future.
    Set-ADUser -AccountExpirationDate ((Get-Date).AddDays(90))

    Combine the two with a pipe-symbol:
    Get-ADUser -SearchBase ‘OU=Temp, DC=contoso, DC=com’ | Set-ADUser -AccountExpirationDate ((Get-Date).AddDays(90))




    9



    0

Leave a Reply