还可以使用Select-Object和Format-Listcmdlet 显示对象的属性值。Select-Object和Format-List每个 都有一个 Property参数。 可以使用Property参数指定一个或多个属性及其值。 或者,可以使用通配符 (*) 来表示所有属性。 例如,以下命令显示 pwsh.exe 文件的所有属性的值。
This command gets the values of the LastWriteTime, CreationTime, and Root properties of a folder. The property values are returned in the order in which you specified the property names.PowerShell Copy Get-ItemPropertyValue -Path 'C:\Program Files\PowerShell' -Name LastWriteTime,CreationTime,...
ModuleType Version Name ExportedCommands --- --- --- --- Script 21.1.18102 SqlServer {Add-SqlAvailabilityDatabase, Add-SqlAvailabilityGroupList... 连接到 SQL Server 并获取服务器信息 以下步骤使用 PowerShell Core 连接到 Linux 上的 SQL Server 实例,并显示几个服务器属性。 在PowerShell 提示符下...
Add the AIShell module to telemetry collection list (#24747) Add helper in EnumSingleTypeConverter to get enum names as array (#17785) (Thanks @fflaten!) Return correct FileName property for Get-Item when listing alternate data streams (#18019) (Thanks @kilasuit!) Add -ExcludeModule parameter...
Set-ExecutionPolicyuses theExecutionPolicyparameter to specify theUndefinedpolicy. TheScopeparameter specifies theCurrentUser. To view the execution policy settings, use theGet-ExecutionPolicycmdlet with theListparameter. Example 6: Set the execution policy for the current PowerShell session ...
In the CSV file, each object is represented by a character-separated list of the property values of the object. The property values are converted to strings using theToString()method. The strings are represented by the property value name.Export-CSV -IncludeTypeInformationdoes not export the met...
Type: MultiValuedProperty Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False Applies to: Exchange Online, Exchange Online Protection-AccessTypeThe AccessType parameter specifies the privacy type for the Microsoft 365 Group. Valid values are...
Value is the property value to search for. Enclose text values and variables in single quotation marks ('Value'or'$Variable'). If a variable value contains single quotation marks, you need to identify (escape) the single quotation marks to expand the variable correctly. For example, instead ...
Gets a list of CIM classes in a specific namespace. Syntax PowerShell Get-CimClass[[-ClassName] <string>] [[-Namespace] <string>] [-Amended] [-OperationTimeoutSec <uint>] [-ComputerName <string[]>] [-MethodName <string>] [-PropertyName <string>] [-QualifierName <string>] [<Common...
对于高级用例,你必须直接从短信提供程序或对象查询操作结果对象。 创建新的SMS_EmbeddedPropertyList实例,还可以设置值。 例子 $propList = New-CMEmbeddedPropertyList -PropertyListName MyList -Values (“abc”、“def”、“xyz”) New-CMQuery 创建新查询。