def restart_apppool(name):
 pscmd = list()
 pscmd.append("Restart-WebAppPool '{0}'".format(name))
 cmd_ret = _srvmgr(str().join(pscmd))
 return (cmd_ret['retcode'] == 0)

def restart_apppool ( name ) : pscmd = list ( ) pscmd . append ( "Restart-WebAppPool '{0}'" . format ( name ) ) cmd_ret = _srvmgr ( str ( ) . join ( pscmd ) ) return ( cmd_ret [ 'retcode' ] == 0 )
restart an iis application pool .