Property values
DistinguishedName : CN=kw.k.com,CN=System,DC=my,DC=kw,DC=k,DC=com
Name : kw.k.com
ObjectClass : trustedDomain
ObjectGuid : 4bbec03e-b031-4b54-9d6c-2e3e812b6e66
PropertyNames : {Direction, DisallowTransivity, DistinguishedName, ForestTransitive, IntraForest, IsTreeParent, IsTreeRoot,
Name, ObjectClass, ObjectGUID, SelectiveAuthentication, SIDFilteringForestAware, SIDFilteringQuarantined,
Source, Target, TGTDelegation, TrustAttributes, TrustedPolicy, TrustingPolicy, TrustType, UplevelOnly,
UsesAESKeys, UsesRC4Encryption}
AddedProperties : {}
RemovedProperties : {}
ModifiedProperties : {}
PropertyCount : 23
Although every object of a specific type has the same properties, the values of those properties describe the particular object. For example, every FileInfo object has a CreationTime property, but the value of that property differs for each file.
Or using
Select-Object
and expanding collection properties
powershell命令get-aduser的输出结果类似于
我想在'PropertyNames'中查看每个属性的值。如何实现这个目标?
powerhell命令get-aduser输出的结果类似于DistinguishedName : CN=kw.k.com,CN=System,DC=my,DC=kw,DC=k,DC=com Name : kw.k.com ObjectClass : trustedDomain ....
你可以通过几种方式获得和或扩展属性来获得其值。这是一个有据可查的用例,并不针对这个cmdlet。iRon显示的内容和下面的内容取决于你需要看到多少。试试...
(Get-ADTrust -Identity 'corp.contoso.com').PropertyNames