Author Posts

June 6, 2017 at 6:46 pm

Hi All,

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:

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!

Regards, Paul

June 8, 2017 at 4:20 pm

Honestly, this isn't really a PowerShell question – and I only mention it because this might not be the best place to get an answer to your question. might be a better resource, since you've got a ton of developers there using WPF already. If they can answer you in C#, it's easy enough to turn that into PowerShell.

June 9, 2017 at 7:44 am

Hi Don,

Ok thanks, no problem, I'll try to post my question on Stackoverflow.