Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 178097

Update Client Settings

$
0
0

I'm trying to update my systems to allow copy and paste and a few other things.  The settings get changed but don't seem to apply until I open the configuration in the web browser and close it.  I figure the browser thing is 'saving' the settings.  How can I go about getting my settings to save in my powershell script?

 

 

PowerShell Code

 

$folder = Get-Folder "LAB" | where {$_.Parent.Name -eq "DEVELOPMENT"}

 

$vms = $folder | Get-VM

 

ForEach ($vm in $vms){
Write-Host -ForegroundColor Yellow "Checking settings for $($vm.Name)"
    $advancedsettings = Get-AdvancedSetting -Entity $vm

    if ($advancedsettings.Name -notcontains "suspend.disabled"){
    "suspend.disabled NOT FOUND"
    $vm | New-AdvancedSetting -Name "suspend.disabled" -Value "TRUE" -Confirm:$false -Force
    }

    if ($advancedsettings.Name -notcontains "isolation.tools.copy.disable"){
    "isolation.tools.copy.disable NOT FOUND"
    $vm | New-AdvancedSetting -Name "isolation.tools.copy.disable" -Value "FALSE" -Confirm:$false
    }

    if ($advancedsettings.Name -notcontains "isolation.tools.paste.disable"){
    "isolation.tools.paste.disable NOT FOUND"
    $vm | New-AdvancedSetting -Name "isolation.tools.paste.disable" -Value "FALSE" -Confirm:$false
    }

}

 



Viewing all articles
Browse latest Browse all 178097

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>