- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我只是很好奇,正在寻找对 expandProperty
行为的解释。转变。
有时:
some-command | select-object property1, property2 -expand property3
Property1 Property2 property3
aaaaaaa bbbbbb c
aaaaaaa bbbbbb d
Property3
c
d
Get-Acl | select PSChildname, owner -ExpandProperty Access
Get-Acl | select PSChildname, owner -ExpandProperty AccessToString
最佳答案
必须引用 Select-Object 上的文档
Specifies a property to select, and indicates that an attempt should be made to expand that property. Wildcards are permitted in the property name.
For example, if the specified property is an array, each value of the array is included in the output. If the property contains an object, the properties of that object are displayed in the output.
access
这是
System.Security.AccessControl.FileSystemAccessRule
的数组符合以下描述:
If the property contains an object, the properties of that object are displayed in the output.
AccessToString
是单个字符串或标量。虽然我找不到任何明确的信息,但 PowerShell 似乎取代了对
-Property
的任何引用。 .
If you apply ExpandProperty to a property which is not a collection, it gives you just the values not the object with properties.
-Expand
时所看到的一致,而不是关于其他指定属性的存在。在非集合属性上。
关于powershell - 寻求对 Powershell ExpandProperty 行为的解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47812439/
我在管道中有一些对象,如下所示: $arr1 = @( (New-Object -TypeName psobject -Property @{'objname'='obj1';props=@(
我正在尝试使用 PowerShell 中的 -ExpandProperty 功能来阻止标题出现在输出中,并设置没有分钟和秒的日期格式。这只是为了获取 AD 对象的创建日期: Get-ADCompute
我只是很好奇,正在寻找对 expandProperty 行为的解释。转变。 有时: some-command | select-object property1, property2 -expand
我在使用 -expand 时遇到问题select-object 的参数小命令。我从帮助文件中了解到可以得到select-object输出扩展的属性和其他属性,但这在我的情况下似乎不起作用。 遵循帮助文
我有一组具有 id、用户名、电子邮件、current_sign_in_at、身份等属性的对象。其中 Identities 属性是具有两个属性的对象数组。这将是一个对象的 json 表示: {
如果一直使用以下命令行来查询简单的 Web 表单,以识别进行后续表单 POST 所需的所有输入字段。然而,我只是遇到了一个相对简单的网络表单,它有两个输入字段,下面的命令无法识别它们: Invoke-
我是一名优秀的程序员,十分优秀!