Value Description --- --- False Indicates that you cannot pipe a value to the parameter. True (by Value) Indicates that you can pipe any value to the parameter, just so the value has the .NET Framework type specified for the parameter or the value can be converted to the specified .NE...
ConfigParametersKeyedCollection[string,ConfigParameter]连接器的配置参数表。 凭证PSCredential包含管理员在“连接”选项卡上输入的任何凭据。 分区分区CSEntry 位于的目录分区。 CSEntryCSEntry接收密码更改或重置的对象的连接器空间条目。 操作类型字符串指示作是重置(SetPassword)还是更改(ChangePassword)。
param( [Parameter(Argument1=value1, Argument2=value2)] $ParameterName ) 매개 변수 특성에서 생략하면 매개 변수 특성의 부울 인수 형식이 기본적으로 False로 설정됩니다. 인수 값을 $true 이름으로 설...
$PSDefaultParameterValues= @{'Send-MailMessage:SmtpServer'='Server123''Get-WinEvent:LogName'='Microsoft-Windows-PrintService/Operational'} cmdlet 和参数名称可以包含通配符。 使用$true和$false设置开关参数的值,例如Verbose。 此示例将所有命令详细参数设置为$true。
如果禁用此策略设置,PowerShell 不会记录任何 PowerShell 模块的执行事件。 如果未配置此策略设置,则每个模块的LogPipelineExecutionDetails属性将确定 PowerShell 是否记录该模块的执行事件。 默认情况下,所有模块的LogPipelineExecutionDetails属性设置为$False。
function Get-PCInfo { [CmdletBinding()] param( [Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][string[]]$computername ) PROCESS { Write-Verbose "Beginning PROCESS block" foreach ($computer in $computername) { Write-Verbose "Connecting to $computer" try...
Value Description --- --- False Indicates that you cannot pipe a value to the parameter. True (by Value) Indicates that you can pipe any value to the parameter, just so the value has the .NET Framework type specified for the parameter or the value can be converted to the specified .NE...
Function Test-ScriptCmdlet { [CmdletBinding(SupportsShouldProcess=$true)] param ($Parameter1) begin{} process{} end{} } begin This block is used to provide optional one-time preprocessing for the function. The PowerShell runtime uses the code in this block once for each instance of the fu...
Update branch for release - Transitive - false - none (#24754) Update Microsoft.PowerShell.PSResourceGet to 1.1.0 (#24767) Add a parameter that skips verify packages step (#24763) Make the AssemblyVersion not change for servicing releases (#24667) Fixed release pipeline errors and switched...
类型:SwitchParameter 接受的值:true Position:Named 默认值:False 必需:False 接受管道输入:False 接受通配符:False -Subsystem 指定用于新PSSession的 SSH 子系统。 这指定在目标上使用的子系统,如sshd_config中定义。 子系统使用预定义的参数启动特定版本的 PowerShell。 如果远程计算机上不存在指定的子系统,该命令将...