def _parse_return_code_powershell(string):
 regex = re.search('ReturnValue\\s*: (\\d*)', string)
 if (not regex):
  return (False, 'Could not parse PowerShell return code.')
 else:
  return int(regex.group(1))

def _parse_return_code_powershell ( string ) : regex = re . search ( 'ReturnValue\\s*: (\\d*)' , string ) if ( not regex ) : return ( False , 'Could not parse PowerShell return code.' ) else : return int ( regex . group ( 1 ) )
return from the input string the return code of the powershell command .