Category Microsoft Server 2016

Query Active Directory – Security Script

PowerShell script to query active directory : Identify Accounts with Password expiring is disabled Identify Accounts have not logged on for 30 or 90 days and accounts have never logged…

Read More

Azure – Update Management

How to maintain the patch status of your Windows and Linux machines "You can use Update Management in Azure Automation to manage operating system updates for your Windows and Linux…

Read More

Ping sweep script test

POWERSHELL import-CSV "" | foreach { $result = Test-Connection -ComputerName $_.Name -Count 1 -Quiet $_.name, $result -join ',' | out-file "c:\scripts\PingSweep\computer_results.txt" -Append } COMMAND /BATCH SCRIPT Create list of computers…

Read More

Task : Output A List Of Home Drive Paths Configured In Active Directory

#DSQuery dsquery user -name "*" -limit 0 | dsget user -samid -hmdir -hmdrv -profile >c:\temp\usersV2.txt   #PowerShell # More flexibility # Includes the state of the computer account (Enable or…

Read More

List all users in the domain and email addresses

 import-module activedirectory #List all users in the domain # Display Name and Email Address get-aduser -Filter *  -SearchBase "dc=Test,dc=com" -Properties Displayname,emailaddress | select displayname ,emailaddress | Export-Csv C:\temp\users_and_email.csv     

Read More