We can get Adcomputerobjects from Ad..But how to filter or list out the Cluster name from Ad.
Below is a simple Powershell Script to get Cluster name(Alias) from Ad Computer Object
Get-ADComputer -Filter 'servicePrincipalName -Like "*MSClusterVirtualServer*"' -Properties Name, LastLogonTimestamp, pwdLastSet, servicePrincipalName| Select Name, @{n='LastLogonTimestamp';e={[DateTime]::FromFileTime($_.LastLogonTimestamp)}}, @{n='pwdLastSet';e={[DateTime]::FromFileTime($_.pwdLastSet)}}, DistinguishedName
Regards
Bijesh
No comments:
Post a Comment