def list_modules(desc=False):
 cmd = u'Get-InstalledModule'
 modules = _pshell(cmd)
 if isinstance(modules, dict):
  ret = []
  if desc:
   modules_ret = {}
   modules_ret[modules[u'Name']] = copy.deepcopy(modules)
   modules = modules_ret
   return modules
  ret.append(modules[u'Name'])
  return ret
 names = []
 if desc:
  names = {}
 for module in modules:
  if desc:
   names[module[u'Name']] = module
   continue
  names.append(module[u'Name'])
 return names

def list_modules ( desc = False ) : cmd = u'Get-InstalledModule' modules = _pshell ( cmd ) if isinstance ( modules , dict ) : ret = [ ] if desc : modules_ret = { } modules_ret [ modules [ u'Name' ] ] = copy . deepcopy ( modules ) modules = modules_ret return modules ret . append ( modules [ u'Name' ] ) return ret names = [ ] if desc : names = { } for module in modules : if desc : names [ module [ u'Name' ] ] = module continue names . append ( module [ u'Name' ] ) return names
list the modules loaded on the minion .