Categorygithub.com/jbrekelmans/go-winrm
repositorypackage
0.0.0-20231006080232-4e03a8f62e98
Repository: https://github.com/jbrekelmans/go-winrm.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Go Reference

Introduction

This package enables clients written in Go to quickly upload files to a Windows server, based on the Windows Remote Management (WinRM) protocol.

The approach to copying files is the same as Ansible's, and directories can be recursively copied in parallel. These two features make this package hundreds of times faster than github.com/packer-community/winrmcp.

To realize the above, this package exposes WinRM functionality useful for passing data to PowerShell pipelines via stdin, that is not available in github.com/masterzen/winrm:

  1. The command options WINRS_CONSOLEMODE_STDIN and WINRS_SKIP_CMD_SHELL are exposed. These options are defined here.
  2. The stdin stream of a command can be closed.

It should be noted that github.com/masterzen/winrm has better documentation than this package, and will probably be better maintained. But we have a simpler way of supporting different authentication methods, by allowing users to set a *http.Client rather than inventing another abstraction.

How do I use this package?

See test/main.go for example code.