Few of the articles are posted as Images, Please use Laptop / Computers to go through the articles for best experience. For phone users, switch to Web Version

Please Share with your colleagues if you found these blogs informative. Happy Learning :-)

Youtube Tutorials || For more refer below links -

Windows Server Video Links

Patch Installation via Command line in Windows Servers - YouTube

Tutorial4 Converting Windows Server Evaluation to Full Version (youtube.com)

Resetting Local Admin Password on Windows Servers (youtube.com)


Active Directory Video Links

Move FSMO Roles via Command Line - YouTube

Active Directory - Lost and Found Conflict - YouTube

Active Directory - Fine Grain Password Policy - YouTube

Restricting Domain Users from Joining Workstations to the Domain (youtube.com)

LAPS Implementation (youtube.com)

Forcefully Demotion of a Domain Controller (youtube.com)


Setting up Practical LABS Video Links

Tutorial 1 Getting Started with LAB Design || Downloading Setups || Vmware Workstation Installation (youtube.com)

Tutorial2 - VM Creation || Windows Server Installation || Sysprep (youtube.com)

Tutorial 3 - Setting up first Windows Server using Generalized template - YouTube

Tutorial 4 Converting Windows Server Evaluation to Full Version (youtube.com)

Tutorial5 Setting up Windows Servers with Basic Postconfiguration (youtube.com)

Tutorial6 Promoting First Domain Controller (youtube.com)

Tutorial7 Using Windows Server as a Router (youtube.com)

Tutorial8 Promoting DC with Higher OS / Upgrading DC to a Higher OS (youtube.com)




Powershell Script - AD User Account & Password related details

 <#Read Me

Script Usage - Finding UserID password related details such as -

1. Password Expired or not ?

2. If Expired, then on which day it's going to expired ?

3. How many days left before it expires ?

4. Whether UserId is active or not ?


Note - Input.txt contains Samaccountname of all the users against which you are looking to get info.

Input.txt should be in the same location of script.

Refer Userdetails_$date.csv for detailed output.


**************************************************************************#>


$inputuserids = Get-Content ./Input.txt

$date = $(Get-Date -Format "dd_MM_yyy")+".csv"

foreach($userid in $inputuserids)

{

    try{


Get-ADUser -Identity $userid -Properties Displayname,msDS-UserPasswordExpiryTimeComputed,PasswordExpired,Enabled,`

Passwordlastset | Select Displayname,Samaccountname,@{n="AccountStatus";e={if($($_.Enabled) -eq $true){"Active"}else{"Disabled"}}},`

Passwordlastset,PasswordExpired,@{n="ExpiryDate";e={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}},`

@{n="DaysLeft";e={(New-TimeSpan -Start $(Get-Date) -End $([datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed"))).Days}}`

| Export-Csv ./Userdetails_$date.csv -NoTypeInformation -Append


}

catch

{

$userid | Select-Object -Property @{n="Displayname";e={"NA"}},@{n="Samaccountname";e={$userid}},@{n="AccountStatus";e={"NA"}},@{n="Passwordlastset";e={"NA"}},@{n="PasswordExpired";e={"NA"}},@{n="ExpiryDate";e={"NA"}},@{n="DaysLeft";e={"NA"}}| Export-Csv ./Userdetails_$date.csv -NoTypeInformation -Append


}


}

Sample Output