def _get_cmd_with_privileges(policy="RemoteSigned"):
    """Factory function that runs powershell scripts with a specific Policy."""

    def _get_cmd(command):
        return ("powershell -NonInteractive -NoLogo -ExecutionPolicy "
                "{} -File {}".format(policy, command))
    return _get_cmd