{"id":619,"date":"2011-07-25T20:29:34","date_gmt":"2011-07-26T00:29:34","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=619"},"modified":"2011-07-25T20:29:34","modified_gmt":"2011-07-26T00:29:34","slug":"make-powercli-run-faster","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/make-powercli-run-faster\/","title":{"rendered":"Make PowerCLI run faster"},"content":{"rendered":"<p>I came across this article: <a href=\"http:\/\/blogs.vmware.com\/vipowershell\/2011\/06\/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html\">http:\/\/blogs.vmware.com\/vipowershell\/2011\/06\/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html<\/a> and decided to test the steps out myself:<\/p>\n<pre><code class=\"language-dos\">\r\nREM View the following link for details: http:\/\/blogs.vmware.com\/vipowershell\/2011\/06\/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html\r\n\r\nC:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install \"VimService41.XmlSerializers, Version=4.1.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\nC:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install \"VimService40.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\nC:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install \"VimService25.XmlSerializers, Version=2.5.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\n\r\nREM If you are running on 64-bit OS, you need to run the following as well:\r\nif %PROCESSOR_ARCHITECTURE% == AMD64 (\r\nC:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\ngen.exe install \"VimService41.XmlSerializers, Version=4.1.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\nC:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\ngen.exe install \"VimService40.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\nC:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\ngen.exe install \"VimService25.XmlSerializers, Version=2.5.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f\"\r\n)\r\n<\/code><\/pre>\n<p>Running the NGEN.EXE commands made my connect-viserver cmdlet run a bit faster&#8230;it now takes 8 seconds the first time instead of 12.  Not much savings, but if I had time to waste I wouldn&#8217;t be using PowerCLI in the first place!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I came across this article: http:\/\/blogs.vmware.com\/vipowershell\/2011\/06\/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html and decided to test the steps out myself: REM View the following link for details: http:\/\/blogs.vmware.com\/vipowershell\/2011\/06\/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install &#8220;VimService41.XmlSerializers, Version=4.1.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f&#8221; C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install &#8220;VimService40.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f&#8221; C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe install &#8220;VimService25.XmlSerializers, Version=2.5.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f&#8221; &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/make-powercli-run-faster\/\">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-619","post","type-post","status-publish","format-standard","hentry","category-scripting","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/619","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=619"}],"version-history":[{"count":7,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/619\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}