Hi Rob,
Thanks so much I will test this.
Rob, the following snippet is a modification of one of your great scripts.
I believe this will return all attributes of the computer object in AD, but I cant see in the following, the attribute AccountDisabled. I must be doing something wrong.
(M) cn
(M) instanceType
(M) nTSecurityDescriptor
(M) objectCategory
(M) objectClass
(M) objectSid
(M) sAMAccountName
(O) accountExpires
(O) accountNameHistory
(O) aCSPolicyName
(O) adminCount
(O) adminDescription
(O) adminDisplayName
(O) allowedAttributes
(O) allowedAttributesEffective
(O) allowedChildClasses
(O) allowedChildClassesEffecti
(O) altSecurityIdentities
(O) assistant
(O) attributeCertificateAttrib
(O) audio
(O) badPasswordTime
(O) badPwdCount
(O) bridgeheadServerListBL
(O) businessCategory
(O) c
(O) canonicalName
(O) carLicense
(O) catalogs
(O) co
(O) codePage
(O) comment
(O) company
(O) controlAccessRights
(O) countryCode
(O) createTimeStamp
(O) dBCSPwd
(O) defaultClassStore
(O) defaultLocalPolicyObject
(O) department
(O) departmentNumber
(O) description
(O) desktopProfile
(O) destinationIndicator
(O) directReports
(O) displayName
(O) displayNamePrintable
(O) distinguishedName
(O) division
(O) dNSHostName
(O) dSASignature
(O) dSCorePropagationData
(O) dynamicLDAPServer
(O) employeeID
(O) employeeNumber
(O) employeeType
(O) extensionName
(O) facsimileTelephoneNumber
(O) flags
(O) fromEntry
(O) frsComputerReferenceBL
(O) fRSMemberReferenceBL
(O) fSMORoleOwner
(O) garbageCollPeriod
(O) generationQualifier
(O) givenName
(O) groupMembershipSAM
(O) groupPriority
(O) groupsToIgnore
(O) homeDirectory
(O) homeDrive
(O) homePhone
(O) homePostalAddress
(O) houseIdentifier
(O) info
(O) initials
(O) internationalISDNNumber
(O) ipPhone
(O) isCriticalSystemObject
(O) isDeleted
(O) isPrivilegeHolder
(O) jpegPhoto
(O) l
(O) labeledURI
(O) lastKnownParent
(O) lastLogoff
(O) lastLogon
(O) lastLogonTimestamp
(O) legacyExchangeDN
(O) lmPwdHistory
(O) localeID
(O) localPolicyFlags
(O) location
(O) lockoutTime
(O) logonCount
(O) logonHours
(O) logonWorkstation
(O) machineRole
(O) mail
(O) managedBy
(O) managedObjects
(O) manager
(O) masteredBy
(O) maxStorage
(O) memberOf
(O) mhsORAddress
(O) middleName
(O) mobile
(O) modifyTimeStamp
(O) mS-DS-ConsistencyChildCoun
(O) mS-DS-ConsistencyGuid
(O) mS-DS-CreatorSID
(O) msCOM-PartitionSetLink
(O) msCOM-UserLink
(O) msCOM-UserPartitionSetLink
(O) msDRM-IdentityCertificate
(O) msDS-AdditionalDnsHostName
(O) msDS-AdditionalSamAccountN
(O) msDS-AllowedToDelegateTo
(O) msDS-Approx-Immed-Subordin
(O) msDS-Cached-Membership
(O) msDS-Cached-Membership-Tim
(O) msDS-KeyVersionNumber
(O) msDs-masteredBy
(O) msDS-MembersForAzRoleBL
(O) msDS-NCReplCursors
(O) msDS-NCReplInboundNeighbor
(O) msDS-NCReplOutboundNeighbo
(O) msDS-NonMembersBL
(O) msDS-ObjectReferenceBL
(O) msDS-OperationsForAzRoleBL
(O) msDS-OperationsForAzTaskBL
(O) msDS-ReplAttributeMetaData
(O) msDS-ReplValueMetaData
(O) msDS-Site-Affinity
(O) msDS-TasksForAzRoleBL
(O) msDS-TasksForAzTaskBL
(O) msDS-User-Account-Control-
(O) msExchAssistantName
(O) msExchHouseIdentifier
(O) msExchLabeledURI
(O) msIIS-FTPDir
(O) msIIS-FTPRoot
(O) mSMQDigests
(O) mSMQDigestsMig
(O) mSMQSignCertificates
(O) mSMQSignCertificatesMig
(O) msNPAllowDialin
(O) msNPCallingStationID
(O) msNPSavedCallingStationID
(O) msRADIUSCallbackNumber
(O) msRADIUSFramedIPAddress
(O) msRADIUSFramedRoute
(O) msRADIUSServiceType
(O) msRASSavedCallbackNumber
(O) msRASSavedFramedIPAddress
(O) msRASSavedFramedRoute
(O) name
(O) netbootGUID
(O) netbootInitialization
(O) netbootMachineFilePath
(O) netbootMirrorDataFile
(O) netbootSCPBL
(O) netbootSIFFile
(O) networkAddress
(O) nonSecurityMemberBL
(O) ntPwdHistory
(O) o
(O) objectGUID
(O) objectVersion
(O) operatingSystem
(O) operatingSystemHotfix
(O) operatingSystemServicePack
(O) operatingSystemVersion
(O) operatorCount
(O) otherFacsimileTelephoneNum
(O) otherHomePhone
(O) otherIpPhone
(O) otherLoginWorkstations
(O) otherMailbox
(O) otherMobile
(O) otherPager
(O) otherTelephone
(O) otherWellKnownObjects
(O) ou
(O) ownerBL
(O) pager
(O) partialAttributeDeletionLi
(O) partialAttributeSet
(O) personalTitle
(O) photo
(O) physicalDeliveryOfficeName
(O) physicalLocationObject
(O) policyReplicationFlags
(O) possibleInferiors
(O) postalAddress
(O) postalCode
(O) postOfficeBox
(O) preferredDeliveryMethod
(O) preferredLanguage
(O) preferredOU
(O) primaryGroupID
(O) primaryInternationalISDNNu
(O) primaryTelexNumber
(O) profilePath
(O) proxiedObjectName
(O) proxyAddresses
(O) pwdLastSet
(O) queryPolicyBL
(O) registeredAddress
(O) replPropertyMetaData
(O) replUpToDateVector
(O) repsFrom
(O) repsTo
(O) revision
(O) rid
(O) rIDSetReferences
(O) roomNumber
(O) sAMAccountType
(O) scriptPath
(O) sDRightsEffective
(O) secretary
(O) securityIdentifier
(O) seeAlso
(O) serialNumber
(O) serverReferenceBL
(O) servicePrincipalName
(O) showInAddressBook
(O) showInAdvancedViewOnly
(O) sIDHistory
(O) siteGUID
(O) siteObjectBL
(O) sn
(O) st
(O) street
(O) streetAddress
(O) structuralObjectClass
(O) subRefs
(O) subSchemaSubEntry
(O) supplementalCredentials
(O) systemFlags
(O) telephoneNumber
(O) teletexTerminalIdentifier
(O) telexNumber
(O) terminalServer
(O) textEncodedORAddress
(O) thumbnailLogo
(O) thumbnailPhoto
(O) title
(O) tokenGroups
(O) tokenGroupsGlobalAndUniver
(O) tokenGroupsNoGCAcceptable
(O) uid
(O) unicodePwd
(O) url
(O) userAccountControl
(O) userCert
(O) userCertificate
(O) userParameters
(O) userPassword
(O) userPKCS12
(O) userPrincipalName
(O) userSharedFolder
(O) userSharedFolderOther
(O) userSMIMECertificate
(O) userWorkstations
(O) uSNChanged
(O) uSNCreated
(O) uSNDSALastObjRemoved
(O) USNIntersite
(O) uSNLastObjRem
(O) uSNSource
(O) volumeCount
(O) wbemPath
(O) wellKnownObjects
(O) whenChanged
(O) whenCreated
(O) wWWHomePage
(O) x121Address
(O) x500uniqueIdentifier
Main Topics
Browse All Topics





by: RobSampsonPosted on 2009-10-06 at 19:00:07ID: 25511648
Hi Simon,
You can actually just use the AccountDisabled property of a computer object.
Regards,
Rob.
Select allOpen in new window