{"id":254,"date":"2011-01-26T09:20:29","date_gmt":"2011-01-26T14:20:29","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=254"},"modified":"2011-01-26T09:20:29","modified_gmt":"2011-01-26T14:20:29","slug":"which-virtual-machine-consoles-are-open","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/which-virtual-machine-consoles-are-open\/","title":{"rendered":"Which Virtual Machine consoles are open?"},"content":{"rendered":"<p>Ever wonder which virtual machine consoles were open?  I was working on an unrelated script the other day and stumbled on the &#8216;NumMksConnections&#8217; property.  It is a simple integer that appears to contain the number of open Mouse-Keyboard-Screen connections to a virtual machine.  A simple PowerCLI one liner will show us all of the virtual machines with more than 0 open connections.<\/p>\n<pre>\r\nGet-View -viewtype virtualmachine | %{if ($_.RunTime.NumMksConnections -ne 0) {write-host $_.config.name has $_.RunTime.NumMksConnections console connection`(s`) open}}\r\n<\/pre>\n<p>I noticed a few other properties in RunTime that I&#8217;d like to try out.  Question and ToolsInstallerMounted may be worth trying to throw in the next version of vCheck.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever wonder which virtual machine consoles were open? I was working on an unrelated script the other day and stumbled on the &#8216;NumMksConnections&#8217; property. It is a simple integer that appears to contain the number of open Mouse-Keyboard-Screen connections to &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/which-virtual-machine-consoles-are-open\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-scripting","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":3,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}