Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251579

Re: Need help with Set-VMHostAdvancedConfiguration

$
0
0

Hi LucD

I need your help with this....following doesn't work because of the variable $datastorename and I can't work out the issue....

 

Connect-VIServer 'vcenter'

 

$tempstring = get-datastore
$datastorename = $tempstring -like '*scratch'  #There is a datastore called vcenter12_scratch

 

New-PSDrive -Name $hostname -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore $datastorename) -Scope global  #Get-Datastore doesn't work

$value1 = "/vmfs/volumes/$datastorename/$syslogFoldername"       #Will this work?

Set-VMHostAdvancedConfiguration -VMHost $vmhost -Name "ScratchConfig.ConfiguredScratchLocation" -Value $value1

 

Thanks for your help

Vickie


Viewing all articles
Browse latest Browse all 251579

Trending Articles



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