#NEWLINE# def update( name , maximum_version = None , required_version = None ) : #NEWLINE# #INDENT# "\n    Update a PowerShell module to a specific version, or the newest\n\n    :param name: Name of a Powershell module\n    :type  name: ``str``\n\n    :param maximum_version: The maximum version to install, e.g. 1.23.2\n    :type  maximum_version: ``str``\n\n    :param required_version: Install a specific version\n    :type  required_version: ``str``\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt 'win01' psget.update PowerPlan\n    " #NEWLINE# flags = [ ( 'Name' , name ) ] #NEWLINE# if ( maximum_version is not None ) : #NEWLINE# #INDENT# flags . append ( ( 'MaximumVersion' , maximum_version ) ) #NEWLINE# #UNINDENT# if ( required_version is not None ) : #NEWLINE# #INDENT# flags . append ( ( 'RequiredVersion' , required_version ) ) #NEWLINE# #UNINDENT# params = '' #NEWLINE# for ( flag , value ) in flags : #NEWLINE# #INDENT# params += '-{0} {1} ' . format ( flag , value ) #NEWLINE# #UNINDENT# cmd = 'Update-Module {0} -Force' . format ( params ) #NEWLINE# _pshell ( cmd ) #NEWLINE# return ( flags in list_modules ( ) )