| Crates.io | rust-winrm-client |
| lib.rs | rust-winrm-client |
| version | 0.1.2 |
| created_at | 2025-12-05 12:42:42.133049+00 |
| updated_at | 2025-12-08 09:03:19.317569+00 |
| description | CLI tool for WinRM management - remote Windows command execution and file transfer |
| homepage | https://github.com/oktay454/rust-winrm-client |
| repository | https://github.com/oktay454/rust-winrm-client |
| max_upload_size | |
| id | 1968127 |
| size | 125,889 |
Rust ile yazılmış Windows Uzaktan Yönetim (WinRM) istemcisi.
cargo build --release
Çalıştırılabilir ikilik dosya: target/release/rust_winrm_client
# Basit CMD komutları - tırnak gerekmez
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure command whoami
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure command hostname
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure command ipconfig
# Upload
winrm-client -e server -u admin -p pass upload local.txt C:\\remote.txt
# Download
winrm-client -e server -u admin -p pass download C:\\file.txt ./local.txt
# Ortam değişkenlerini ayarla
export WINRM_ENDPOINT=10.0.3.203
export WINRM_USER=administrator
export WINRM_PASSWORD="secretpass"
export WINRM_AUTH=ntlm # ntlm, basic, kerberos
export WINRM_ENCRYPT=true # HTTPS kullan
export WINRM_INSECURE=true # SSL sertifika doğrulamasını atla
# Parametresiz çalıştır
winrm-client command whoami
winrm-client command -- powershell -ExecutionPolicy Unrestricted -Command "Get-Process"
Boolean Değerler:
true veya false (büyük/küçük harf duyarlı)1, 0, yes, no çalışmaz# Sessiz kip (varsayılan) - sadece komut çıktısı
winrm-client -e server command "test"
# Verbose kip - detaylı çıktılar
winrm-client -v -e server command "test"
| Kısa | Uzun | Ortam Değişkeni | Açıklama |
|---|---|---|---|
-e |
--endpoint |
WINRM_ENDPOINT |
WinRM bağlantı noktası (IP veya hostname) |
-u |
--user |
WINRM_USER |
Kullanıcı adı |
-p |
--password |
WINRM_PASSWORD |
Parola |
-a |
--auth |
WINRM_AUTH |
Kimlik doğrulama yöntemi (ntlm/basic/kerberos) |
--encrypt |
WINRM_ENCRYPT |
HTTPS kullan (port 5986) | |
--no-encrypt |
WINRM_NO_ENCRYPT |
HTTP kullan (port 5985) | |
-k |
--insecure |
WINRM_INSECURE |
SSL sertifika doğrulamasını atla |
-v |
--verbose |
WINRM_VERBOSE |
Detaylı çıktı |
| Kod | Anlamı |
|---|---|
| 0 | Başarılı |
| 1 | Kimlik doğrulama hatası |
| 2 | Bağlantı hatası |
| 3 | Komut çalıştırma hatası |
| 4 | Dosya aktarım hatası |
# Çıkış kodu denetimi
winrm-client -e server command "test"
echo $? # Exit code'u göster
winrm-client -e 10.0.3.203 -u administrator -p Admin789 \
--encrypt --insecure command hostname
export WINRM_ENDPOINT=10.0.3.203
export WINRM_USER=administrator
export WINRM_PASSWORD=Admin789
export WINRM_ENCRYPT=true
export WINRM_INSECURE=true
winrm-client command whoami
# PowerShell komutları için -- ayırıcı ve parametreler
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure \
command -- powershell -ExecutionPolicy Unrestricted -Command Get-Process
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure \
command -- powershell -Command Get-Service
# Tırnak içinde PowerShell komutları (basit olanlar)
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure \
command -- powershell -Command "Get-Date"
# CMD komutları
winrm-client -e 10.0.3.203 -u administrator -p Admin789 --encrypt --insecure \
command -- cmd /c "dir C:\\"
Not: PowerShell/CMD parametreleri (-ExecutionPolicy, -Command, /c vb.) içeren komutlarda -- ayırıcı mutlaka kullanılmalıdır. Aksi takdirde parametreler CLI argümanı olarak yorumlanır ve hata alırsınız.
Katkılar memnuniyetle karşılanır!
GPL-3.0-or-later