CommandType Name Version --- --- --- Function Get-Version Function Get-PSVersion Function Get-MrPSVersion 如果要从当前会话中删除这些函数,请从FunctionPSDrive 中删除它们,或关闭并重新打开 PowerShell。 PowerShell Get-ChildItem-PathFunction:\Get-*Version |Remove-Item 验证函数是否确实已删除...
named Default value None Accept pipeline input? False Accept wildcard characters? true -InputObject <System.ServiceProcess.ServiceController[]> Specifies ServiceController objects that represent the services to stop. Enter a variable that contains the objects, or type a command or expression that gets ...
}privatestring[] processNames;///<summary>///Specify the Force parameter that allows the user to override///the ShouldContinue call to force the stop operation. This///parameter should always be used with caution.///</summary>[Parameter]publicSwitchParameter Force {get{returnforce; }set{ ...
param( [ValidateDrive("C", "D", "Variable", "Function")] [string]$Path ) ValidateUserDrive 検証属性ValidateUserDrive 属性は、パラメーター値がドライブ内でUser表される必要があることを指定します。 パスが別のドライブを参照している場合、PowerShell によっ...
get-command -syntax set-location Exp: PS C:\Users\vol_20120330> get-command-syntaxset-locationSet-Location [[-Path] <String>] [-PassThru] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable<String>] [-Out...
Get-WinEvent 参考 反馈 模块: Microsoft.PowerShell.Diagnostics 获取本地和远程计算机上的事件日志和事件跟踪日志文件中的事件。 语法 PowerShell复制 Get-WinEvent[[-LogName] <String[]>] [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCredential>] [-FilterXPath <String>] [-Force] [...
SOURCESDIRECTORY:$Env:BUILD_SOURCESDIRECTORY"# Make sure there's a build numberif(-not$Env:BUILD_BUILDNUMBER) {Write-Error("BUILD_BUILDNUMBER environment variable is missing.")exit1}Write-Verbose"BUILD_BUILDNUMBER:$Env:BUILD_BUILDNUMBER"# Get and validate the version data$VersionData= [regex]::...
When you run the function, the value you supply for a parameter is assigned to a variable that contains the parameter name. The value of that variable can be used in the function. The following example is a function calledGet-SmallFiles. This function has a$Sizeparameter. The function displa...
Get-Variable Cmdlet Gets the variables in the current console. New-Variable Cmdlet Creates a new variable. Set-Variable Cmdlet Sets the value of a variable. Creates the variable if one with the requested name does not exist. Remove-Variable Cmdlet Deletes a variable and its value. ...
Get-Error Get-Event Get-EventSubscriber Get-FileHash Get-FormatData Get-Host Get-MarkdownOption Get-Member Get-PSBreakpoint Get-PSCallStack Get-Random Get-Runspace Get-RunspaceDebug Get-SecureRandom Get-TraceSource Get-TypeData Get-UICulture Get-Unique Get-Uptime Get-Variable Get-Verb Group-Objec...