I have the following in a vbs file that i am trying to run from the command line:
strServerName = "ServerName"
strAppPoolName = "DefaultAppPool"
set objAppPools = GetObject("IIS://" & strServerName
& "/w3svc/AppPools/" & strAppPoolName & "")
objAppPools.Recycle()
And yet when I run the vbs from cmd line i get the following error:
Microsoft VBScript runtime error: ActiveX component can't create object: 'Get Object'_
I am running XP on my local machine, and the remote machine has IIS 7.
How can I get this to work?
I am not sure regarding the particular vb script but I would recommend using "appcmd" (http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe)
%windir%\system32\inetsrv
to your path if it is not alreadyappcmd recycle apppool "apppool_name"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With