CYB 300 6-3 Activity David Obi

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

300

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

4

Uploaded by JusticeRain3195

Report
12/8/2023 Obi, David SNHU CYB 300 6-3 Activity Haifeng Ji
Below I have the screenshots and scripts that I used! 1. #David Obi- 12/08/2023 - CYB-300 2. 3. Import-Module ActiveDirectory 4. 5. #This will reset all passwords to NewP@$$w0rd 6. $password = ConvertTo-SecureString -AsPlainText "NewP@$$w0rd" -Force 7. 8. # loop structure 9. ForEach ($user in $users) 10. { 11. #Default Password for Current Account 12. GetADUser $user | Set-ADAccountPassword -NewPassword $password -Reset 13. }
1. #David Obi - 12/08/2023 - CYB-300 2. #This line will search for all logins from all the users in the finance OU 3. Get-ADUser -Filter * -SearchBase "ou=sales, dc=PRACTICELABS, dc=COM" - ResultPageSize 0 -Properties CN,lastLogonTimestamp | Select CN,@{n="lastLogonDate";e={[datetime]::FromFileTime($_.lastLogonTimestamp)}}| 4. #This line will show the logon results on a text file 5. Out-File -FilePath.\user_logon.txt
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help