#NEWLINE# def avail_modules( desc = False ) : #NEWLINE# #INDENT# "\n    List available modules in registered Powershell module repositories.\n\n    :param desc: If ``True``, the verbose description will be returned.\n    :type  desc: ``bool``\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt 'win01' psget.avail_modules\n        salt 'win01' psget.avail_modules desc=True\n    " #NEWLINE# cmd = 'Find-Module' #NEWLINE# modules = _pshell ( cmd ) #NEWLINE# names = [ ] #NEWLINE# if desc : #NEWLINE# #INDENT# names = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# for module in modules : #NEWLINE# #INDENT# if desc : #NEWLINE# #INDENT# names [ module [ 'Name' ] ] = module [ 'Description' ] #NEWLINE# continue #NEWLINE# #UNINDENT# names . append ( module [ 'Name' ] ) #NEWLINE# #UNINDENT# return names