powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-PowerCLIConfiguration



NAME
Set-PowerCLIConfiguration

SYNOPSIS
Modifies the vSphere PowerCLI configuration.

SYNTAX
Set-PowerCLIConfiguration [-ProxyPolicy ] [-DefaultVIServerMode ] [-InvalidCertif
icateAction ] [-DisplayDeprecationWarnings []] [-WhatIf] [-Confirm] [ rs>]


DESCRIPTION
Modifies the vSphere PowerCLI configuration. You can specify whether the vSphere PowerCLI uses a system proxy serve
r to connect to the vSphere server. Also, you can use the DefaultVIServerMode parameter to set the default servers
policy. For more information about default servers, see the description of Connect-VIServer.


PARAMETERS
-ProxyPolicy
Specify whether the vSphere PowerCLI uses a system proxy server to connect to the vSphere server. The valid val
ues are NoProxy and UseSystemProxy.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-DefaultVIServerMode
Change the server connection mode. The new configuration takes effect immediately after you run the cmdlet. The
following values are valid:

- Single - Switching to "single" removes all server connections except the last established one. If no target s
ervers are specified, cmdlets run only on the last connected server.

- Multiple - All servers connected after switching to "multiple" mode are stored together with the current serv
er connection in an array variable. If no target servers are specified, cmdlets run on the servers in the varia
ble.

For more information on default servers, see the description of Connect-VIServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-InvalidCertificateAction
Define the action to take when an attempted connection to a server fails due to a certificate error. The follow
ing values are valid:

Unset - this is the default value and it acts as a "Warn" value for Connect-VIServer and as "Prompt" for "Conne
ct-CloudServer".

Prompt - if the server certificate is not trusted the cmdlet will prompt you for a course of action before it c
ontinues. There are several options:
Deny - no connection will be established.
Accept for once - accept the connection only for the current PowerCLI session. You will be prompted
again if you attempt to connect to the same server from other processes.
Accept Permanently - the action will add this certificate as an exception in the "SSL Certificate E
xceptions" user list. Connect cmdlets will never prompt again what action to take for this particulate certific
ate and server.
Accept For All Users - same as the above, however the exception will be added to all user lists, wh
ich is common for all Windows accounts on the current machine.

Fail - the cmdlet will not establish connection if the certificate is not valid.

Ignore - the cmdlet will establish the connection without taking into account that the certificate is invalid.
Warn - the cmdlet will display a warning saying that the certificate is not valid, the reason why it is not con
sidered valid and then will print additional information about the certificate.

Required? false
Position? named
Default value Unset
Accept pipeline input? false
Accept wildcard characters? false

-DisplayDeprecationWarnings []
Indicate whether you want to see warnings about deprecated elements.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,
the cmdlet runs without asking for user confirmation.

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
PowerCLIConfiguration


NOTES




-------------- Example 1 --------------

C:\PS>Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Confirm


Specifies that the VMware vSphere PowerCLI does not use a proxy server to connect to the vSphere server.





-------------- Example 2 --------------

C:\PS>Set-PowerCLIConfiguration -DefaultVIServerMode multiple -Confirm


Sets the server connection mode of PowerCLI to "multiple".





-------------- Example 3 --------------

C:\PS>Set-PowerCLIConfiguration -ProxyPolicy NoProxy -DefaultVIServerMode Single


Changes the default server connection mode and the proxy policy of PowerCLI.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-PowerCLIConfiguration.html
Get-PowerCLIConfiguration