如何获取powershell cmdlet get-adtrust的扩展输出?
powershell命令get aduser输出的结果与如何获取powershell cmdlet get-adtrust的扩展输出?,powershell,dns,enumeration,Powershell,Dns,Enumeration,powershell命令get aduser输出的结果与 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
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
我想查看“PropertyNames”中每个属性的值。如何做到这一点 您可以通过几种方式获取和或扩展属性以获取这些值。这是一个有良好文档记录的用例,不是此cmdlet特有的。根据你需要看的程度,铁器会显示什么和下面的内容 试试看 点引用 属性值 虽然特定类型的每个对象都具有相同的 属性,这些属性的值描述特定的 对象例如,每个FileInfo对象都有一个CreationTime 属性,但该属性的值对于每个文件都不同 获取对象属性值的最常用方法 就是用点法。键入对对象的引用,例如 包含对象的变量,或获取对象的命令。 然后,键入一个点(.),后跟属性名称 或者使用并扩展集合属性
Get-ADTrust -Identity 'corp.contoso.com' |
Select-Object -ExpandProperty PropertyNames
…|转换为Json-深度5
?最后一行输入错误:将PropertNames
更改为PropertyNames
。对不起,没有足够的代表。
Get-ADTrust -Identity 'corp.contoso.com' |
Select-Object -ExpandProperty PropertyNames