Windows - Deployment (Infra as code)

Windows 95 Wallpaper Version

About

Infra as code.

How to connect to a Windows machine and execute deployment script.

List

psexec

psexec

psexec \\server01 -u domain\user -p P@ssw0rd ipconfig /all 

WMI

WMI.NET or Windows Management Instrumentation ( applications in C#, Microsoft® Visual Basic, or Microsoft J#)

var processToRun = new[] { "notepad.exe" };
var connection = new ConnectionOptions();
connection.Username = "username";
connection.Password = "password";
var wmiScope = new ManagementScope(String.Format("\\\\{0}\\root\\cimv2", REMOTE_COMPUTER_NAME), connection);
var wmiProcess = new ManagementClass(wmiScope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
wmiProcess.InvokeMethod("Create", processToRun);

WINEXE

https://sourceforge.net/projects/winexe/ (Linux to Windows)

winexe -A credentials.cfg //remotehost "command arg"
username=user
password=pass
domain=workplace

Powershell

Powershell can be used to manage remote computers from a CLI using WMI (Windows Management Instrumentation). PowerShell remoting allows the execution of Powershell scripts and commands on remote computers.

Documentation / Reference





Discover More
Card Puncher Data Processing
Azure - Deployment

in Azure Azure has two different deployment models for creating and working with resources: Resource...



Share this page:
Follow us:
Task Runner