Infra Watcher is a .Net Core application that can connect and execute commands on servers. The application supports execution of basic operations as well as custom scripts. Queries can be customized to run a custom command or script.
- Copy the files
git clone 'https://github.com/jhonnyelhelou91/InfraWatcher.git' 'C:\git\C#\InfraWatcher'
- Open the solution
C:\git\C#\InfraWatcher\InfraWatcher.sln
- Build solution
Ctrl + Shift + B
- Visual Studio
- .Net Core SDK
To run the tests, you need the following:
- Build solution
Ctrl + Shift + B
- Open Test Explorer from Visual Studio
Ctrl + Q
then typeTest Explorer
and hitEnter
- Update the hosts and credentials
- Run All tests
Loads commands as string texts. This is useful to:
- Support simple commands.
- Install libraries
- Perform common commands: uname, hostname, df -k, ls, grep...
Loads scripts as command texts. This is useful to:
- Support complex commands.
- Commands are different between operating system, version, processor type...
- Use elevated commands.
- Support retry logic.
- Support logging on the server.
- etc...
Opens a connection that is able to execute WMI queries. This is useful to:
- Connect to Windows servers
- Support simple commands that manage CIM entities
- Get machine information (since multiple providers exist for multiple windows operating systems)
- Support WQL query
- Other features
Opens an SSH connection where you can execute commands or scripts. This is useful to:
- Connect to Linux servers
- Support simple to complex operations
- Other features
Opens a connection to WinRM service on a remote server. This is useful to:
- Connect to Windows servers
- Support simple to complex operations
- Use PowerShell commands or scripts to perform operations