Files

15 lines
314 B
PowerShell
Executable File

function Connect-ToVCenter {
param(
[string]$Server,
[pscredential]$Credential
)
```
Import-Module VMware.PowerCLI -ErrorAction Stop
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null
Connect-VIServer -Server $Server -Credential $Credential -ErrorAction Stop | Out-Null
```
}