< Back

Set-PowerCLIConfiguration

Sun Jan 19, 2020 7:08 pm

NAME Set-PowerCLIConfiguration



SYNOPSIS

This cmdlet modifies the VMware PowerCLI configuration.





SYNTAX

Set-PowerCLIConfiguration [-CEIPDataTransferProxyPolicy <ProxyPolicy>] [-DefaultVIServerMode

<DefaultVIServerMode>] [-DisplayDeprecationWarnings <Boolean>] [-InvalidCertificateAction <BadCertificateAction>]

[-ParticipateInCeip <Boolean>] [-ProxyPolicy <ProxyPolicy>] [-Scope <ConfigurationScope>] [-VMConsoleWindowBrowser

<String>] [-WebOperationTimeoutSeconds <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet modifies the VMware PowerCLI configuration.





PARAMETERS

-CEIPDataTransferProxyPolicy <ProxyPolicy>

Specifies the proxy policy for the connection through which Customer Experience Improvement Program (CEIP)

data is sent to VMware. Setting this option is valid only when ParticipateInCEIP option is set to $true.

Changing this setting requires a restart of PowerCLI before it takes effect.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultVIServerMode <DefaultVIServerMode>

Specifies 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

servers 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

server connection in an array variable. If no target servers are specified, cmdlets run on the servers in the

variable.



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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DisplayDeprecationWarnings <Boolean>

Indicates whether you want to see warnings about deprecated elements.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InvalidCertificateAction <BadCertificateAction>

Define the action to take when an attempted connection to a server fails due to a certificate error. The

following values are valid:



Unset - this is the default value and it acts as a "Fail".



Prompt - if the server certificate is not trusted the cmdlet will prompt you for a course of action before it

continues. There are several options: - Deny - Cancel the server connection.



- Connect once - Establish the server connection and suppress further warnings for the current PowerShell

session.



- Add a permanent exception for the server_address/certificate pair - Persist the server certificate in the

PowerCLI Trusted Certificate Store (PCTCS) for the current user and establish the server connection.



- Add a permanent exception for all users - Persist the server/certificate pair both in the current user

PowerCLI Trusted Certificate Store (PCTCS) and in the All Users PCTCS and establish the server connection.





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

considered valid and then will print additional information about the certificate.



On PowerShell Core, only the Fail and Ignore options are supported.

For more information about invalid certificates, run 'Get-Help about_invalid_certificates'.





Required? false

Position? named

Default value Unset

Accept pipeline input? False

Accept wildcard characters? false



-ParticipateInCeip <Boolean>

Specifies if PowerCLI should send anonymous usage information to VMware. For more information about the

Customer Experience Improvement Program (CEIP), see the PowerCLI User's Guide. Setting this option is valid

only for the AllUsers and User configuration scopes. Changing this setting requires a restart of PowerCLI

before it takes effect.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProxyPolicy <ProxyPolicy>

Specifies whether VMware PowerCLI uses a system proxy server to connect to the vCenter Server system. The

valid values are NoProxy and UseSystemProxy.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Scope <ConfigurationScope>

Specifies the scope of the setting that you want to modify. The parameter accepts Session, User, and All Users

values. *Session - the setting is valid for the current VMware PowerCLI session only and overrides any

User and All Users settings. *User - the setting is valid for the current Windows user only, overrides

All Users settings, and is applied only if a Session setting cannot be detected. *All Users - the setting

is valid for all users and is applied only if Session and User settings cannot be detected.



Required? false

Position? named

Default value User

Accept pipeline input? False

Accept wildcard characters? false



-VMConsoleWindowBrowser <String>

Specifies the Web browser to be used for opening virtual machine console windows (by using the

Open-VMConsoleWindow cmdlet). The browser must be 32-bit.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WebOperationTimeoutSeconds <Int32>

Defines the timeout for Web operations. The default value is 300 sec. To specify an infinite operation

timeout, pass a negative integer to this parameter. Changing this setting requires a restart of PowerCLI

before it takes effect.



Required? false

Position? named

Default value 300

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

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



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

One or more modified PowerCLIConfiguration objects







NOTES









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



Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Scope Session



Modifies the proxy policy of VMware PowerCLI for the Session scope.

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



Set-PowerCLIConfiguration -ProxyPolicy NoProxy -DefaultVIServerMode Single



Changes the default server connection mode and the proxy policy of VMware PowerCLI for the User scope.

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



Set-PowerCLIConfiguration -DefaultVIServerMode 'Single' -Scope

([VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::User -bor

[VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::AllUsers)



Changes the default server connection mode of VMware PowerCLI for the User and AllUsers scopes.



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... ation.html

Get-PowerCLIConfiguration