diff --git a/reference/5.1/CimCmdlets/New-CimInstance.md b/reference/5.1/CimCmdlets/New-CimInstance.md index 6602b51d5dd4..615c56591734 100644 --- a/reference/5.1/CimCmdlets/New-CimInstance.md +++ b/reference/5.1/CimCmdlets/New-CimInstance.md @@ -19,46 +19,48 @@ Creates a CIM instance. ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ClassNameSessionSet ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ResourceUriSessionSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-WhatIf] [-Confirm] [] ``` ### ResourceUriComputerSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-WhatIf] [-Confirm] [] ``` ### CimClassSessionSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - -CimSession [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] -CimSession [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ### CimClassComputerSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - [-ComputerName ] [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -75,7 +77,12 @@ This example creates an instance of a CIM Class named win32_environment in the r on the computer. ```powershell -New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";VariableValue="testvalue";UserName="domain\user"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "domain\user" +} +New-CimInstance -ClassName Win32_Environment -Property $prop ``` No client side validation is performed if the class does not exist, the properties are wrong, or if @@ -89,7 +96,12 @@ of the variable are then passed to the `New-CimInstance` cmdlet. ```powershell $class = Get-CimClass -ClassName Win32_Environment -New-CimInstance -CimClass $class -Property @{Name="testvar";VariableValue="testvalue";UserName="Contoso\User1"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "Contoso\User1" +} +New-CimInstance -CimClass $class -Property $prop ``` ### Example 3: Create a dynamic instance on the client @@ -100,7 +112,16 @@ computer without getting the instance from the server. The new instance is store on the server. ```powershell -$a = New-CimInstance -ClassName Win32_Process -Property @{Handle=0} -Key Handle -ClientOnly +$instance = @{ + ClassName = 'Win32_Process' + Property = @{ + Handle = 0 + } + Key = 'Handle' + ClientOnly = $true +} +$a = New-CimInstance @instance + Get-CimInstance -CimInstance $a Invoke-CimMethod -CimInstance $a -MethodName GetOwner ``` @@ -385,7 +406,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/CimCmdlets/New-CimSession.md b/reference/5.1/CimCmdlets/New-CimSession.md index f5a69cd816fe..4c91492c9e4e 100644 --- a/reference/5.1/CimCmdlets/New-CimSession.md +++ b/reference/5.1/CimCmdlets/New-CimSession.md @@ -17,16 +17,17 @@ Creates a CIM session. ### CredentialParameterSet (Default) ``` -New-CimSession [-Authentication ] [[-Credential] ] - [[-ComputerName] ] [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] - [-Port ] [-SessionOption ] [] +New-CimSession [-Authentication ] + [[-Credential] ] [[-ComputerName] ] [-Name ] + [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] + [-SessionOption ] [] ``` ### CertificateParameterSet ``` -New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] [-Name ] - [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] +New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] + [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] [-SessionOption ] [] ``` @@ -65,7 +66,7 @@ This example creates a CIM session to each of the computers specified by **Compu comma separated list. ```powershell -New-CimSession -ComputerName Server01,Server02,Server03 +New-CimSession -ComputerName Server01, Server02, Server03 ``` ### Example 4: Create a CIM session with a friendly name @@ -74,7 +75,7 @@ This example creates a remote CIM session to each of the computers specified by the comma separated list, and assigns a friendly name to the new sessions, by specifying **Name**. ```powershell -New-CimSession -ComputerName Server01,Server02 -Name FileServers +New-CimSession -ComputerName Server01, Server02 -Name FileServers Get-CimSession -Name File* ``` @@ -237,8 +238,8 @@ Accept wildcard characters: False Specifies a friendly name for the CIM session. You can use the name to refer to the CIM session when using other cmdlets, such as the -[`Get-CimSession`](Get-CimSession.md) cmdlet. -The name is not required to be unique to the computer or the current session. +[Get-CimSession](Get-CimSession.md) cmdlet. The name is not required to be unique to the computer +or the current session. ```yaml Type: System.String @@ -348,7 +349,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/CimCmdlets/New-CimSessionOption.md b/reference/5.1/CimCmdlets/New-CimSessionOption.md index bba0cadfd195..2d84d37a831b 100644 --- a/reference/5.1/CimCmdlets/New-CimSessionOption.md +++ b/reference/5.1/CimCmdlets/New-CimSessionOption.md @@ -18,8 +18,8 @@ Specifies advanced options for the New-CimSession cmdlet. ### ProtocolTypeSet (Default) ``` -New-CimSessionOption [-Protocol] [-UICulture ] [-Culture ] - [] +New-CimSessionOption [-Protocol] [-UICulture ] + [-Culture ] [] ``` ### WSManParameterSet @@ -28,15 +28,16 @@ New-CimSessionOption [-Protocol] [-UICulture ] [-Cul New-CimSessionOption [-NoEncryption] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-EncodePortInServicePrincipalName] [-Encoding ] [-HttpPrefix ] [-MaxEnvelopeSizeKB ] [-ProxyAuthentication ] - [-ProxyCertificateThumbprint ] [-ProxyCredential ] [-ProxyType ] - [-UseSsl] [-UICulture ] [-Culture ] [] + [-ProxyCertificateThumbprint ] [-ProxyCredential ] + [-ProxyType ] [-UseSsl] [-UICulture ] [-Culture ] + [] ``` ### DcomParameterSet ``` -New-CimSessionOption [-Impersonation ] [-PacketIntegrity] [-PacketPrivacy] - [-UICulture ] [-Culture ] [] +New-CimSessionOption [-Impersonation ] [-PacketIntegrity] + [-PacketPrivacy] [-UICulture ] [-Culture ] [] ``` ## DESCRIPTION @@ -71,7 +72,14 @@ parameter, the credentials specified by the **ProxyCredential** parameter, and s command is to skip the CA check, skip the CN check, and use SSL. ```powershell -New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl +$option = @{ + ProxyAuthentication = 'Kerberos' + ProxyCredential = $cred + SkipCACheck = $true + SkipCNCheck = $true + UseSsl = $true +} +New-CimSessionOption @option ``` ### Example 3: Create a CIM session options object with the culture specified diff --git a/reference/7.4/CimCmdlets/New-CimInstance.md b/reference/7.4/CimCmdlets/New-CimInstance.md index 3d17aa2690ce..35051a9fb7f1 100644 --- a/reference/7.4/CimCmdlets/New-CimInstance.md +++ b/reference/7.4/CimCmdlets/New-CimInstance.md @@ -19,46 +19,48 @@ Creates a CIM instance. ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ClassNameSessionSet ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ResourceUriSessionSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-WhatIf] [-Confirm] [] ``` ### ResourceUriComputerSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-WhatIf] [-Confirm] [] ``` ### CimClassSessionSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - -CimSession [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] -CimSession [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ### CimClassComputerSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - [-ComputerName ] [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -77,7 +79,12 @@ This example creates an instance of a CIM Class named win32_environment in the r on the computer. ```powershell -New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";VariableValue="testvalue";UserName="domain\user"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "domain\user" +} +New-CimInstance -ClassName Win32_Environment -Property $prop ``` No client side validation is performed if the class does not exist, the properties are wrong, or if @@ -91,7 +98,12 @@ of the variable are then passed to the `New-CimInstance` cmdlet. ```powershell $class = Get-CimClass -ClassName Win32_Environment -New-CimInstance -CimClass $class -Property @{Name="testvar";VariableValue="testvalue";UserName="Contoso\User1"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "Contoso\User1" +} +New-CimInstance -CimClass $class -Property $prop ``` ### Example 3: Create a dynamic instance on the client @@ -102,7 +114,16 @@ computer without getting the instance from the server. The new instance is store on the server. ```powershell -$a = New-CimInstance -ClassName Win32_Process -Property @{Handle=0} -Key Handle -ClientOnly +$instance = @{ + ClassName = 'Win32_Process' + Property = @{ + Handle = 0 + } + Key = 'Handle' + ClientOnly = $true +} +$a = New-CimInstance @instance + Get-CimInstance -CimInstance $a Invoke-CimMethod -CimInstance $a -MethodName GetOwner ``` @@ -387,7 +408,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/CimCmdlets/New-CimSession.md b/reference/7.4/CimCmdlets/New-CimSession.md index 812340fe1904..b509da082fbe 100644 --- a/reference/7.4/CimCmdlets/New-CimSession.md +++ b/reference/7.4/CimCmdlets/New-CimSession.md @@ -17,16 +17,17 @@ Creates a CIM session. ### CredentialParameterSet (Default) ``` -New-CimSession [-Authentication ] [[-Credential] ] - [[-ComputerName] ] [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] - [-Port ] [-SessionOption ] [] +New-CimSession [-Authentication ] + [[-Credential] ] [[-ComputerName] ] [-Name ] + [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] + [-SessionOption ] [] ``` ### CertificateParameterSet ``` -New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] [-Name ] - [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] +New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] + [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] [-SessionOption ] [] ``` @@ -350,7 +351,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/CimCmdlets/New-CimSessionOption.md b/reference/7.4/CimCmdlets/New-CimSessionOption.md index 8d18c180a2af..189798cfd147 100644 --- a/reference/7.4/CimCmdlets/New-CimSessionOption.md +++ b/reference/7.4/CimCmdlets/New-CimSessionOption.md @@ -18,8 +18,8 @@ Specifies advanced options for the New-CimSession cmdlet. ### ProtocolTypeSet (Default) ``` -New-CimSessionOption [-Protocol] [-UICulture ] [-Culture ] - [] +New-CimSessionOption [-Protocol] [-UICulture ] + [-Culture ] [] ``` ### WSManParameterSet @@ -28,15 +28,16 @@ New-CimSessionOption [-Protocol] [-UICulture ] [-Cul New-CimSessionOption [-NoEncryption] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-EncodePortInServicePrincipalName] [-Encoding ] [-HttpPrefix ] [-MaxEnvelopeSizeKB ] [-ProxyAuthentication ] - [-ProxyCertificateThumbprint ] [-ProxyCredential ] [-ProxyType ] - [-UseSsl] [-UICulture ] [-Culture ] [] + [-ProxyCertificateThumbprint ] [-ProxyCredential ] + [-ProxyType ] [-UseSsl] [-UICulture ] [-Culture ] + [] ``` ### DcomParameterSet ``` -New-CimSessionOption [-Impersonation ] [-PacketIntegrity] [-PacketPrivacy] - [-UICulture ] [-Culture ] [] +New-CimSessionOption [-Impersonation ] [-PacketIntegrity] + [-PacketPrivacy] [-UICulture ] [-Culture ] [] ``` ## DESCRIPTION @@ -73,7 +74,14 @@ parameter, the credentials specified by the **ProxyCredential** parameter, and s command is to skip the CA check, skip the CN check, and use SSL. ```powershell -New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl +$option = @{ + ProxyAuthentication = 'Kerberos' + ProxyCredential = $cred + SkipCACheck = $true + SkipCNCheck = $true + UseSsl = $true +} +New-CimSessionOption @option ``` ### Example 3: Create a CIM session options object with the culture specified diff --git a/reference/7.5/CimCmdlets/New-CimInstance.md b/reference/7.5/CimCmdlets/New-CimInstance.md index 0a7f7c537585..7ad2d6c79ba0 100644 --- a/reference/7.5/CimCmdlets/New-CimInstance.md +++ b/reference/7.5/CimCmdlets/New-CimInstance.md @@ -19,46 +19,48 @@ Creates a CIM instance. ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ClassNameSessionSet ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ResourceUriSessionSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-WhatIf] [-Confirm] [] ``` ### ResourceUriComputerSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-WhatIf] [-Confirm] [] ``` ### CimClassSessionSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - -CimSession [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] -CimSession [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ### CimClassComputerSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - [-ComputerName ] [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -77,7 +79,12 @@ This example creates an instance of a CIM Class named win32_environment in the r on the computer. ```powershell -New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";VariableValue="testvalue";UserName="domain\user"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "domain\user" +} +New-CimInstance -ClassName Win32_Environment -Property $prop ``` No client side validation is performed if the class does not exist, the properties are wrong, or if @@ -91,7 +98,12 @@ of the variable are then passed to the `New-CimInstance` cmdlet. ```powershell $class = Get-CimClass -ClassName Win32_Environment -New-CimInstance -CimClass $class -Property @{Name="testvar";VariableValue="testvalue";UserName="Contoso\User1"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "Contoso\User1" +} +New-CimInstance -CimClass $class -Property $prop ``` ### Example 3: Create a dynamic instance on the client @@ -102,7 +114,16 @@ computer without getting the instance from the server. The new instance is store on the server. ```powershell -$a = New-CimInstance -ClassName Win32_Process -Property @{Handle=0} -Key Handle -ClientOnly +$instance = @{ + ClassName = 'Win32_Process' + Property = @{ + Handle = 0 + } + Key = 'Handle' + ClientOnly = $true +} +$a = New-CimInstance @instance + Get-CimInstance -CimInstance $a Invoke-CimMethod -CimInstance $a -MethodName GetOwner ``` @@ -387,7 +408,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/CimCmdlets/New-CimSession.md b/reference/7.5/CimCmdlets/New-CimSession.md index 273d6806489d..bf4bd53d02a7 100644 --- a/reference/7.5/CimCmdlets/New-CimSession.md +++ b/reference/7.5/CimCmdlets/New-CimSession.md @@ -17,16 +17,17 @@ Creates a CIM session. ### CredentialParameterSet (Default) ``` -New-CimSession [-Authentication ] [[-Credential] ] - [[-ComputerName] ] [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] - [-Port ] [-SessionOption ] [] +New-CimSession [-Authentication ] + [[-Credential] ] [[-ComputerName] ] [-Name ] + [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] + [-SessionOption ] [] ``` ### CertificateParameterSet ``` -New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] [-Name ] - [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] +New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] + [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] [-SessionOption ] [] ``` @@ -76,7 +77,7 @@ This example creates a remote CIM session to each of the computers specified by the comma separated list, and assigns a friendly name to the new sessions, by specifying **Name**. ```powershell -New-CimSession -ComputerName Server01,Server02 -Name FileServers +New-CimSession -ComputerName Server01, Server02 -Name FileServers Get-CimSession -Name File* ``` @@ -350,7 +351,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/CimCmdlets/New-CimSessionOption.md b/reference/7.5/CimCmdlets/New-CimSessionOption.md index fa3eb5995404..9014cd74b3eb 100644 --- a/reference/7.5/CimCmdlets/New-CimSessionOption.md +++ b/reference/7.5/CimCmdlets/New-CimSessionOption.md @@ -18,8 +18,8 @@ Specifies advanced options for the New-CimSession cmdlet. ### ProtocolTypeSet (Default) ``` -New-CimSessionOption [-Protocol] [-UICulture ] [-Culture ] - [] +New-CimSessionOption [-Protocol] [-UICulture ] + [-Culture ] [] ``` ### WSManParameterSet @@ -28,15 +28,16 @@ New-CimSessionOption [-Protocol] [-UICulture ] [-Cul New-CimSessionOption [-NoEncryption] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-EncodePortInServicePrincipalName] [-Encoding ] [-HttpPrefix ] [-MaxEnvelopeSizeKB ] [-ProxyAuthentication ] - [-ProxyCertificateThumbprint ] [-ProxyCredential ] [-ProxyType ] - [-UseSsl] [-UICulture ] [-Culture ] [] + [-ProxyCertificateThumbprint ] [-ProxyCredential ] + [-ProxyType ] [-UseSsl] [-UICulture ] [-Culture ] + [] ``` ### DcomParameterSet ``` -New-CimSessionOption [-Impersonation ] [-PacketIntegrity] [-PacketPrivacy] - [-UICulture ] [-Culture ] [] +New-CimSessionOption [-Impersonation ] [-PacketIntegrity] + [-PacketPrivacy] [-UICulture ] [-Culture ] [] ``` ## DESCRIPTION @@ -73,7 +74,14 @@ parameter, the credentials specified by the **ProxyCredential** parameter, and s command is to skip the CA check, skip the CN check, and use SSL. ```powershell -New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl +$option = @{ + ProxyAuthentication = 'Kerberos' + ProxyCredential = $cred + SkipCACheck = $true + SkipCNCheck = $true + UseSsl = $true +} +New-CimSessionOption @option ``` ### Example 3: Create a CIM session options object with the culture specified diff --git a/reference/7.6/CimCmdlets/New-CimInstance.md b/reference/7.6/CimCmdlets/New-CimInstance.md index 042918d72400..a5eebefad636 100644 --- a/reference/7.6/CimCmdlets/New-CimInstance.md +++ b/reference/7.6/CimCmdlets/New-CimInstance.md @@ -19,46 +19,48 @@ Creates a CIM instance. ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ClassNameSessionSet ``` New-CimInstance [-ClassName] [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-ClientOnly] - [-WhatIf] [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-ClientOnly] [-WhatIf] [-Confirm] [] ``` ### ResourceUriSessionSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] -CimSession [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] -CimSession + [-WhatIf] [-Confirm] [] ``` ### ResourceUriComputerSet ``` New-CimInstance -ResourceUri [-Key ] [[-Property] ] - [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] [-WhatIf] - [-Confirm] [] + [-Namespace ] [-OperationTimeoutSec ] [-ComputerName ] + [-WhatIf] [-Confirm] [] ``` ### CimClassSessionSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - -CimSession [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] -CimSession [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ### CimClassComputerSet ``` -New-CimInstance [-CimClass] [[-Property] ] [-OperationTimeoutSec ] - [-ComputerName ] [-ClientOnly] [-WhatIf] [-Confirm] [] +New-CimInstance [-CimClass] [[-Property] ] + [-OperationTimeoutSec ] [-ComputerName ] [-ClientOnly] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -77,7 +79,12 @@ This example creates an instance of a CIM Class named win32_environment in the r on the computer. ```powershell -New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";VariableValue="testvalue";UserName="domain\user"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "domain\user" +} +New-CimInstance -ClassName Win32_Environment -Property $prop ``` No client side validation is performed if the class does not exist, the properties are wrong, or if @@ -91,7 +98,12 @@ of the variable are then passed to the `New-CimInstance` cmdlet. ```powershell $class = Get-CimClass -ClassName Win32_Environment -New-CimInstance -CimClass $class -Property @{Name="testvar";VariableValue="testvalue";UserName="Contoso\User1"} +$prop = @{ + Name = "testvar" + VariableValue = "testvalue" + UserName = "Contoso\User1" +} +New-CimInstance -CimClass $class -Property $prop ``` ### Example 3: Create a dynamic instance on the client @@ -102,7 +114,16 @@ computer without getting the instance from the server. The new instance is store on the server. ```powershell -$a = New-CimInstance -ClassName Win32_Process -Property @{Handle=0} -Key Handle -ClientOnly +$instance = @{ + ClassName = 'Win32_Process' + Property = @{ + Handle = 0 + } + Key = 'Handle' + ClientOnly = $true +} +$a = New-CimInstance @instance + Get-CimInstance -CimInstance $a Invoke-CimMethod -CimInstance $a -MethodName GetOwner ``` @@ -387,7 +408,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/CimCmdlets/New-CimSession.md b/reference/7.6/CimCmdlets/New-CimSession.md index 3e60357a9505..8f8bde961e0d 100644 --- a/reference/7.6/CimCmdlets/New-CimSession.md +++ b/reference/7.6/CimCmdlets/New-CimSession.md @@ -17,16 +17,17 @@ Creates a CIM session. ### CredentialParameterSet (Default) ``` -New-CimSession [-Authentication ] [[-Credential] ] - [[-ComputerName] ] [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] - [-Port ] [-SessionOption ] [] +New-CimSession [-Authentication ] + [[-Credential] ] [[-ComputerName] ] [-Name ] + [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] + [-SessionOption ] [] ``` ### CertificateParameterSet ``` -New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] [-Name ] - [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] +New-CimSession [-CertificateThumbprint ] [[-ComputerName] ] + [-Name ] [-OperationTimeoutSec ] [-SkipTestConnection] [-Port ] [-SessionOption ] [] ``` @@ -350,7 +351,7 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see -[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/CimCmdlets/New-CimSessionOption.md b/reference/7.6/CimCmdlets/New-CimSessionOption.md index 81107a1f5d0b..dd628f97efbe 100644 --- a/reference/7.6/CimCmdlets/New-CimSessionOption.md +++ b/reference/7.6/CimCmdlets/New-CimSessionOption.md @@ -18,8 +18,8 @@ Specifies advanced options for the New-CimSession cmdlet. ### ProtocolTypeSet (Default) ``` -New-CimSessionOption [-Protocol] [-UICulture ] [-Culture ] - [] +New-CimSessionOption [-Protocol] [-UICulture ] + [-Culture ] [] ``` ### WSManParameterSet @@ -28,15 +28,16 @@ New-CimSessionOption [-Protocol] [-UICulture ] [-Cul New-CimSessionOption [-NoEncryption] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-EncodePortInServicePrincipalName] [-Encoding ] [-HttpPrefix ] [-MaxEnvelopeSizeKB ] [-ProxyAuthentication ] - [-ProxyCertificateThumbprint ] [-ProxyCredential ] [-ProxyType ] - [-UseSsl] [-UICulture ] [-Culture ] [] + [-ProxyCertificateThumbprint ] [-ProxyCredential ] + [-ProxyType ] [-UseSsl] [-UICulture ] [-Culture ] + [] ``` ### DcomParameterSet ``` -New-CimSessionOption [-Impersonation ] [-PacketIntegrity] [-PacketPrivacy] - [-UICulture ] [-Culture ] [] +New-CimSessionOption [-Impersonation ] [-PacketIntegrity] + [-PacketPrivacy] [-UICulture ] [-Culture ] [] ``` ## DESCRIPTION @@ -73,7 +74,14 @@ parameter, the credentials specified by the **ProxyCredential** parameter, and s command is to skip the CA check, skip the CN check, and use SSL. ```powershell -New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl +$option = @{ + ProxyAuthentication = 'Kerberos' + ProxyCredential = $cred + SkipCACheck = $true + SkipCNCheck = $true + UseSsl = $true +} +New-CimSessionOption @option ``` ### Example 3: Create a CIM session options object with the culture specified