Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSubsystem Import-Module Invoke-Command Invoke-History New-Module New-ModuleManifest New-PSRoleCapabilityFile New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption ...
Get-ChildItem$PSHOME\pwsh.exe |Get-Member 命令的输出会列出 FileInfo 对象的成员。成员包括属性和方法。 在 PowerShell 中操作时,可以访问对象的所有成员。 如果只要获取对象的属性而不获取方法,请使用值为的Get-Membercmdlet 的 MemberType 参数,如以下示例所示。Property ...
例如,以下命令显示文件的CreationTime属性pwsh.exe的值。 该Get-ChildItem命令返回一个FileInfo对象,该pwsh.exe file对象表示 。 命令括在括号中,以确保在访问任何属性之前执行该命令。 PowerShell复制 (Get-ChildItem$PSHOME\pwsh.exe).CreationTime Output复制 ...
Get-ChildItem$PSHOME\pwsh.exe |Get-Member 命令的输出会列出 FileInfo 对象的成员。成员包括属性和方法。 在 PowerShell 中操作时,可以访问对象的所有成员。 如果只要获取对象的属性而不获取方法,请使用值为Property的Get-Membercmdlet 的 MemberType 参数,如以下示例所示。
Get-Process | Sort-Object -Property handles 可以通过管道将对象传递给格式化、导出和输出 cmdlet,例如 Format-List、Format-Table、Export-Clixml、Export-CSV 和Out-File。 此示例演示如何使用 Format-List cmdlet 显示进程对象的属性列表。 PowerShell 复制 Get-Process winlogon | Format-List -Property * 还...
Get/Set-ADResourcePropertyList Get/Set-ADResourcePropertyValueType Get/Set-ADDCCloneConfigFile Get/Set-ADReplicationAttributeMetadata Get/Set-ADReplicationConnection Get/Set-ADReplicationFailure Get/Set-ADReplicationPartnerMetadata Get/Set-ADReplicationQueueOperation ...
<CodeProperty> 标记必须具有指定新属性名称的 <Name> 标记和指定定义该属性的代码的 <GetCodeReference> 标记。例如, 对象的 System.IO.DirectoryInfo 属性是 PowerShell FileSystem 提供程序中定义的代码属性。XML 复制 <Type> <Name>System.IO.DirectoryInfo</Name> <Members> <CodeProperty> <Name>Mode</Name...
$File = Get-Item c:\test\textFile.txt $File.PSObject.Properties | Where-Object isSettable | Select-Object -Property Name Name --- PSPath PSParentPath PSChildName PSDrive PSProvider PSIsContainer IsReadOnly CreationTime CreationTimeUtc LastAccessTime LastAccessTimeUtc LastWriteTime LastWriteTimeUtc Attrib...
$File = Get-Item c:\test\textFile.txt $File.PSObject.Properties | Where-Object isSettable | Select-Object -Property Name Name --- PSPath PSParentPath PSChildName PSDrive PSProvider PSIsContainer IsReadOnly CreationTime CreationTimeUtc LastAccessTime LastAccessTimeUtc LastWriteTime LastWriteTimeUtc Attrib...
get-aduser -identity username -Properties * | select DisplayName, City, State 但它给了我一个错误: 代码语言:javascript 代码运行次数:0 复制Cloud Studio 代码运行 get-aduser : The term 'get-aduser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check...