I’m in the proces of creating a small toolkit for internal use. The goal of the toolkit is as follows:
- Use a .xlsx file as input filled with hostnames and domainnames
- Test access to servers befor attempting to perform the tasks (not al hosts are accessable from the same management network)
- Test if remote Powershell is available and usable to send a .ps1 file to execute
- Test if PsExec works and be able to send a script file with Robocopy to the server and execute it.
- Return a object with the results, this should be formatted in a .xlsx file or a csv
- Remove the script that was send to the server after everything is done
Almost everything works and runs, offcorse there are still some bits missing:
- I have to find a way to make it easy to provide credentials for all the unique different domaines. Some of them have a trust, so after the username/password fields there is a combobox to chose credentials to reuse on that domain.
- Small other issues formatting the results object and creating a good output object.
- There are more small things that I need to fix but the one above is a bit a showstopper and is the most important one. So I’ll keep the post only about this.
What I’ve done is created a Gui in Visual Studio, this is already v2
After this I created a function to collect all unique domainnames from the Excelsheet and put these in a object. I’ve uploaded the code to GitHub (Gist) because the XAML code wasn’t visible in the pre /pre tags
The source of the example is located here: gist:d3b8888cf60086092f9055a3d8a810cd · GitHub
What I would likt to accieve is to repeat the credentials row for all the different domains in the object. I tried to split the Xaml code to $XamlHeader, $XamlContent and $XamlFooter but this doesn’t make sense to me. I think there must be a better way to do this.
Thanks in advance!