about_Booleans 项目 2024/01/19 本文内容 简短说明 长说明 从标量类型转换 从集合类型转换 另请参阅 简短说明 描述如何计算布尔表达式。 长说明 PowerShell 可以将任何类型隐式视为布尔值。 请务必了解 PowerShell 用于将其他类型转换为布尔值的规则。
参数集名称 实例属性(只读) 字符串 当前参数集的名称(请参阅 ParameterSetName) ShouldContinue 实例方法 重载 /bool 请求用户确认某项操作。 ShouldProcess 实例方法 超负荷 /bool 在执行操作之前,请求用户确认。 在PowerShell 中,此类型为 System.Management.Automation.PSScriptCmdlet。 4.5.15 错误记录说明类型 自...
實際常值可以有類型尾碼和乘數尾碼。展開資料表 尾碼意義 d decimal 資料類型 kb kbbyte 乘數 mb MB 乘數 gb gbbyte 乘數 tb TB 乘數 pb PB 乘數實際常值有兩種:double 和 decimal。 這些分別以 decimal-type 尾碼的不存在或存在表示。 PowerShell 不支援值的常值表示 [float]。 雙實常值的類型為 [...
“打开模块日志记录”策略设置将打开所选 PowerShell 模块的日志记录。 此设置在所有受影响的计算机上的所有会话中都有效。 如果启用此策略设置并指定一个或多个模块,PowerShell 将在Windows PowerShell登录事件查看器中记录指定模块的管道执行事件。 如果禁用此策略设置,PowerShell 不会记录任何 PowerShell 模块的...
Without the switch parameter, it displays Switch off. PowerShell Copy Switch-Item -On Output Copy Switch on PowerShell Copy Switch-Item Output Copy Switch off You can also assign a Boolean value to a switch when you run the function, as shown in the following example: Power...
类型:SwitchParameter Position:Named 默认值:None 必需:False 接受管道输入:False 接受通配符:False 输入 PSObject 可以通过管道将对象传递给此 cmdlet。 输出 PSObject 此cmdlet 仅返回具有所选属性的输入对象。 备注 PowerShell 包含以下Select-Object别名:
CmdletBinding Property System.Boolean CmdletBinding {get;} CommandType Property System.Management.Automation. CommandTypes CommandType {get;} DefaultParameterSet Property System.String DefaultParameterSet {get;} Definition Property System.String Definition {get;} Description Property System.String Description {ge...
The Boolean-like strings are unconditionally converted to [bool] - even if the parameter they bind to is untyped: The right behavior is to retain them as strings in that event, just like a "number string" such as 1 remains a string when bound to an untyped parameter via -File. iSazonov...
默认情况下,如果在命令管道中包含具有 Select-Object 或Index 参数的 命令,PowerShell 会在生成所选对象数后立即停止生成对象的命令。 此参数是在 Windows PowerShell 3.0 中引入的。 展开表 类型: SwitchParameter Position: Named 默认值: None 必需: False 接受管道输入: False 接受通配符: False...
(Boolean serializeCache) at Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile.ToString() at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object current...