Check if OS is 32bit or 64bit check If Process Is Running in another computer Check if SMB1 is enabled on the AD servers Check if string contains invalid characters Check if string starts with letter/character.
function Get-Sample { [CmdletBinding()] param([string]$Name, [string]$Path) dynamicparam { if ($Path.StartsWith("HKLM:")) { $parameterAttribute = [System.Management.Automation.ParameterAttribute]@{ ParameterSetName = "ByRegistryPath" Mandatory = $false } $attributeCollection = ...
string[] Split(Params char[] separator) string[] Split(char[] separator, int count) string[] Split(char[] separator, System.StringSplitOptions options) string[] Split(char[] separator, int count, System.StringSplitOptions options) string[] Split(string[] separator, System.StringSplitOptions options...
Start-Service [-Name] <String[]> [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]PowerShell Copy Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonPar...
If multiple operations are being performed on the same computer, using a CIM session gives better performance. Type:String[] Aliases:CN, ServerName Position:Named Default value:None Required:False Accept pipeline input:True Accept wildcard characters:False ...
-NoninteractiveStarts the PowerShell console in non-interactive mode. In this mode, PowerShell does not present an interactive prompt to the user. -NoProfileTells the PowerShell console not to load the current user’s profile. -OutputFormatSets the format for output as either text string or ser...
If you typeGet-SmallFileswithout a value, the function assigns 100 to$size. If you provide a value, the function uses that value. Optionally, you can provide a brief help string that describes the default value of your parameter, by adding thePSDefaultValueattribute to the description of your...
seeabout_Scopes. You can use this to build strings containing the command, parameters, and arguments you need, and then invoke the string as if it were a command. The strings that you create must follow the same parsing rules as a command that you type at the command line. For more inf...
Set-TraceSourceConfigures, starts, and stops a trace of Windows PowerShell components. Set-VariableSets the value of a variable. Creates the variable if one with the requested name does not exist. Set-WmiInstanceCreates or updates an instance of an existing WMI class. ...
Windows environment: for all executables all parameters have the type STRING, if there is no implicit conversion for your parameter type you have to convert explicitly in your script. You can even pipe content to the executable with the same restriction (all piped values have the type STRING)....