pyinfra.api.connectors.pyinfrawinrmsession package

class pyinfra.api.connectors.pyinfrawinrmsession.PyinfraWinrmSession(target, auth, **kwargs)

Bases: winrm.Session

This is our subclassed Session that allows for env setting

run_cmd(command, args=(), env=None)
run_ps(script, env=None)

base64 encodes a Powershell script and executes the powershell encoded script command