im trying to script for rodc , which will schedule connect through vpn and see which password was changed last time, if password changed, it will replicate them , so ,,
lets say i have,
$adusers = $users | Get-ADUser -Properties PasswordLastSet | select ` SamAccountname,PasswordLastSet,PasswordCached
and previously saved csv file
$lastfile = Get-ChildItem $logpath -Recurse | where {$_.LastWriteTime.ToShortDateString() -eq (get-date).ToShortDateString()}
$lastsync = Import-Csv $lastfile
$us = Import-Csv $lastfile | select samaccountname,passwordlastset
so,
for compare these properties i want combine these two arrays , specially :
i want $us.passwordlastset to add $adusers.passwordcached property and get one hash table. could please help me, how can i achieve this? multiple properties object from one array add to another proper object properties
cause i want it in one array is that , i want filter with " | where {$_.passwordlastset -ne $aduserpasswordcached}
Thanks,,