2022年12月17日 星期六

winrm-cli (go language)

 https://go.dev/


wget https://go.dev/dl/go1.15.15.linux-amd64.tar.gz

tar -zvxf go1.15.15.linux-amd64.tar.gz

mv go /usr/local


ln -s /usr/local/go/bin/go /usr/bin/go

n -s /usr/local/go/bin/go /usr/local/bin/go

ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc

ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt

===========================

https://github.com/masterzen/winrm-cli

===========================


Building the winrm-cli executable

You can build winrm-cli from source:


git clone https://github.com/masterzen/winrm-cli

cd winrm-cli

make

This will generate a binary in the base directory called ./winrm.


Note: you need go 1.5+. Please check your installation with


go version

Command-line usage

Once built, you can run remote commands like this:


./winrm -hostname remote.domain.com -username "Administrator" -password "secret" "ipconfig /all"

============

My Lib Demo/Example






沒有留言:

張貼留言