{"id":1851,"date":"2013-09-10T03:00:18","date_gmt":"2013-09-10T03:00:18","guid":{"rendered":"http:\/\/www.atumvirt.com\/?p=1851"},"modified":"2013-09-10T03:00:18","modified_gmt":"2013-09-10T03:00:18","slug":"quick-and-dirty-powershell-script-to-check-pvs-write-cache-sizes","status":"publish","type":"post","link":"https:\/\/avtempwp.azurewebsites.net\/2013\/09\/quick-and-dirty-powershell-script-to-check-pvs-write-cache-sizes\/","title":{"rendered":"Quick and Dirty Powershell Script to Check PVS Write Cache Sizes"},"content":{"rendered":"
Add-PSSnapin\u00a0Citrix*\n$reg=get-brokerdesktop -MaxRecordCount 9999 -RegistrationState Registered -DesktopGroupName VDIWIN7 -adminaddress citrixdc.contoso.local\n$results=@(); $reg | %{ $comp=$_.hostedmachinename; $cache=dir \"\\$compD$.vdiskcache\" -force; $results+=\"$comp;$($($cache.length)\/1GB)\"}\n$path0=\"D:WriteCachelatest.txt\"\n$path1=\"D:WriteCachewc_$(get-date -format `\"yyyy-MM-dd_hh-mm_ss`\").txt\"\n$results | out-file $path0\n$results | out-file $path1<\/pre>\nUsing this script you can go to Excel, Data, Import from Text, select Latest.txt, pivot table. Then all you need to do is click refresh in Excel after running this on whatever schedule you want.<\/p>\n","protected":false},"excerpt":{"rendered":"
Add-PSSnapin\u00a0Citrix* $reg=get-brokerdesktop -MaxRecordCount 9999 -RegistrationState Registered -DesktopGroupName VDIWIN7 -adminaddress citrixdc.contoso.local $results=@(); $reg | %{ $comp=$_.hostedmachinename; $cache=dir “\\$compD$.vdiskcache” -force; $results+=”$comp;$($($cache.length)\/1GB)”} $path0=”D:WriteCachelatest.txt” $path1=”D:WriteCachewc_$(get-date -format `”yyyy-MM-dd_hh-mm_ss`”).txt” $results | out-file $path0 $results | out-file $path1 Using this script you can go to Excel, Data, Import from Text, select Latest.txt, pivot table. Then all you need to do is click […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[40,43],"tags":[86,103,105],"_links":{"self":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts\/1851"}],"collection":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/comments?post=1851"}],"version-history":[{"count":0,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts\/1851\/revisions"}],"wp:attachment":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/media?parent=1851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/categories?post=1851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/tags?post=1851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}