def remove_app(name, site):
 pscmd = list()
 current_apps = list_apps(site)
 if (name not in current_apps):
  _LOG.debug('Application already absent: %s', name)
  return True
 pscmd.append("Remove-WebApplication -Name '{0}' -Site '{1}'".format(name, site))
 cmd_ret = _srvmgr(str().join(pscmd))
 if (cmd_ret['retcode'] == 0):
  new_apps = list_apps(site)
  if (name not in new_apps):
   _LOG.debug('Application removed successfully: %s', name)
   return True
 _LOG.error('Unable to remove application: %s', name)
 return False

def remove_app ( name , site ) : pscmd = list ( ) current_apps = list_apps ( site ) if ( name not in current_apps ) : _LOG . debug ( 'Application already absent: %s' , name ) return True pscmd . append ( "Remove-WebApplication -Name '{0}' -Site '{1}'" . format ( name , site ) ) cmd_ret = _srvmgr ( str ( ) . join ( pscmd ) ) if ( cmd_ret [ 'retcode' ] == 0 ) : new_apps = list_apps ( site ) if ( name not in new_apps ) : _LOG . debug ( 'Application removed successfully: %s' , name ) return True _LOG . error ( 'Unable to remove application: %s' , name ) return False
remove an iis application .