def has_powershell():
if platform.system() != '<STR_LIT>':<EOL><INDENT>return False<EOL><DEDENT>cmd = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>with open(os.path.devnull, '<STR_LIT:wb>') as devnull:<EOL><INDENT>try:<EOL><INDENT>subprocess.check_call(cmd, stdout=devnull, stderr=devnull)<EOL><DEDENT>except Exception:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Determine if Powershell is available.