Bird
0
0

What will be the result of running this command?

medium📝 Command Output Q4 of 15
PowerShell - Active Directory
What will be the result of running this command?
Get-ADUser -Filter 'PasswordNeverExpires -eq $true' -Properties PasswordNeverExpires | Select-Object Name, PasswordNeverExpires
AShows only the names of users without any password information
BReturns an error because PasswordNeverExpires is not a valid property
CLists all users regardless of password expiration settings
DLists all users whose passwords are set to never expire, showing their names and password expiration status
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the filter

    The filter PasswordNeverExpires -eq $true selects users with passwords set to never expire.
  2. Step 2: Check properties requested

    The -Properties PasswordNeverExpires ensures this property is retrieved for each user.
  3. Step 3: Output selection

    Select-Object Name, PasswordNeverExpires outputs the user's name and their password expiration status.
  4. Final Answer:

    Lists all users whose passwords are set to never expire, showing their names and password expiration status -> Option D
  5. Quick Check:

    Filter matches users with non-expiring passwords [OK]
Quick Trick: Filter selects users with PasswordNeverExpires true [OK]
Common Mistakes:
  • Assuming PasswordNeverExpires is not a retrievable property
  • Expecting all users to be listed without filtering

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes