<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic invoke-vmscript and batch file in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441001#M82</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to activate a windows vm using the invoke vmscript powercli command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmd /c slmgr / ato works fine when i run it from a dos command but when i call this via a script then the script just hangs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried to put the command above in a batch file locally on the system and just use invoke vmscript to run the batch file but that just hangs also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea what i am missing ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$test = "cmd /c slmgr/ato"&lt;/P&gt;&lt;P&gt;Invoke-VMScript -Scripttype bat -ScriptText $test -VM $vm -GuestUser administrator -GuestPassword -------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2015 14:59:43 GMT</pubDate>
    <dc:creator>scriptermad</dc:creator>
    <dc:date>2015-06-12T14:59:43Z</dc:date>
    <item>
      <title>invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441001#M82</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to activate a windows vm using the invoke vmscript powercli command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmd /c slmgr / ato works fine when i run it from a dos command but when i call this via a script then the script just hangs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried to put the command above in a batch file locally on the system and just use invoke vmscript to run the batch file but that just hangs also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea what i am missing ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$test = "cmd /c slmgr/ato"&lt;/P&gt;&lt;P&gt;Invoke-VMScript -Scripttype bat -ScriptText $test -VM $vm -GuestUser administrator -GuestPassword -------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:59:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441001#M82</guid>
      <dc:creator>scriptermad</dc:creator>
      <dc:date>2015-06-12T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441002#M83</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check if all of the prerequisites for Invoke-VMScript are there ?&lt;/P&gt;&lt;P&gt;See &lt;A href="http://www.lucd.info/2012/01/01/will-invoke-vmscript-work/"&gt;Will Invoke-VMScript work ?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that some of the requirements have change in newer PowerCLI and vSPhere releases.&lt;/P&gt;&lt;P&gt;But that script should give you a start where to look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be hints in the &lt;STRONG&gt;vmware.log&lt;/STRONG&gt; that is to be found in the VM's folder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 23:02:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441002#M83</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2015-06-12T23:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441003#M84</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;apologies, i should have mentioned that i have many other commands working as part of this invoke-vmscript command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am joining them using &amp;amp;&amp;amp; in the script text&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 07:06:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441003#M84</guid>
      <dc:creator>scriptermad</dc:creator>
      <dc:date>2015-06-15T07:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441004#M85</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you have only the problematic command in the CMD file, does it also hang ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 08:52:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441004#M85</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2015-06-15T08:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441005#M86</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yep, script just stays there for ages doing nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i have the script only containing things like disk labelling etc then it works fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 09:56:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441005#M86</guid>
      <dc:creator>scriptermad</dc:creator>
      <dc:date>2015-06-15T09:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441006#M87</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try forcing a non-GUI run, like&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;cscript c:\windows\system32\slmgr.vbs &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;instead of just slmgr ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:02:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441006#M87</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2015-06-15T10:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441007#M88</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at least that comes back with an error "invalid combination of command parameters"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i ran cscript c:\windows\system32\slmgr.vbs /ato and it said "activating windows , run slui.exe 0x2a 0x80072ee7 to display the error text (says this on the machine im running script from, not on the destination vm)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing this on a test vm without internet access so i reckon this could work with internet access &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will test in a few days and post the results &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:40:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441007#M88</guid>
      <dc:creator>scriptermad</dc:creator>
      <dc:date>2015-06-15T10:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: invoke-vmscript and batch file</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441008#M89</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this worked great, thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 08:01:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/invoke-vmscript-and-batch-file/m-p/441008#M89</guid>
      <dc:creator>scriptermad</dc:creator>
      <dc:date>2015-06-18T08:01:10Z</dc:date>
    </item>
  </channel>
</rss>

