Param(
    [string]
    $VMName,

    [switch]
    $SRMImplemented
)

Write-Verbose "Connect to vCenter" -Verbose
Connect-ITDvCenter -Credential $Secret:ndgov_svcitdvmvcro
Write-Verbose "Start Sync" -Verbose

switch ($PSBoundParameters.Keys){
    'VMName' { $SyncITDVMwareVMMetadataToSharePointParams += @{VMName = $VMName} }
    'SRMImplemented' { $SyncITDVMwareVMMetadataToSharePointParams += @{SRMImplemented = $SRMImplemented} }
}

Write-Host $SyncITDVMwareVMMetadataToSharePointParams

Sync-ITDVMwareVMMetadataToSharePoint @SyncITDVMwareVMMetadataToSharePointParams -Verbose
#Write-Output $VMName
Write-Verbose "End Sync"

Write-Verbose "Disconnect vCenter"
Disconnect-ITDvCenter