So, the short story is I’ve been selected to write a script for work that will rationalize individual ips from a certain range (ideally a list of ranges), turn those individual ips into hostnames, and then silently copy over an executable and then use PSexec to run the other on remote computers. Once it has finished it will remove the executable and close.
To be honest and fair, everything I have in this script so far is pieced together from other much smarter people than me. I’m very brand new to powershell. Hopefully someone can help me out.
I’ll go ahead and list out my issues in bullet point and maybe someone can help.
- I’d prefer to be able to pull multiple ranges/subnets at once instead of just one at a time. Possibly from a text file or csv file.
- The first is separating out Windows machines from the first list of hostnames of all the ips in the range.
- The copy over itself of the executable doesn’t seem to be working and it can’t access the destination.
- Next, I can’t get the script to remove the executable on the off chance that its copied it over.
If someone can show me how to post my script or share it so others can see it, that would be awesome
submitted by /u/TheMadSmith
[link] [comments]
The post HELP/QUESTION- Tweaking a script with multiple parts appeared first on How to Code .NET.