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