Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
managing an IIS AppPool from Ruby
require 'win32ole'
# Connect to the WMI WebAdministration namespace.
web_admin = WIN32OLE.connect("winmgmts:root\\WebAdministration")
app_pool = web_admin.get("ApplicationPool.Name='DefaultAppPool'")
app_pool.stop
app_pool.start
app_pool.recycle
require 'win32/registry'
keyname = "SOFTWARE\\Microsoft\\InetStp\\Components"
registry = Win32::Registry::HKEY_LOCAL_MACHINE.open(keyname)
tools_installed = registry["ManagementScriptingTools"] == 1
puts "IIS Management Scripts and Tools installed? #{tools_installed}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.