Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I apologize but I don't really know where to begin with this. Here's what I'd like to do if possible.
I have a few old boxes that I want to put a very thin, no-gui distro of Linux on and start using them as single-task machines for simple things that can just run all day and night.
The tasks I want them to do, however, are against Windows machines.
For example, I'd like to have a single box that cycles through scanning all applicable subnets and, as it finds an online system, it attempts a few steps.
First, it would check whether or not a scheduled task already exists on that Windows machine. If it does, it's done.
Second, if no task present, it would check to see if a specified share exists (say... \\system\taskfolder). If not exists, create it on that Windows machine.
Third, if/when share exists, check to see if saved scheduled task (mytask.xml) exists in \\system\taskfolder. If it doesn't exist, it will put a copy of it on there from the current Linux box to that Windows share.
Fourth, it will then reach out to the Windows machine and run schtasks to deploy the task. Similar to, if I were on a Windows box, I'd use psexec \\system cmd.exe /c schtasks -myswitchesetc...
Is this possible from a basic, stripped down Linux box to a group of identified, on a domain, Windows boxes (of course, I have the correct Win creds)?
some of them obviously possible, some of them may require windows related knowledge.
Especially how do you want to execute commands on which version of windows (like how to find scheduled tasks)?
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by MSmith_CCC
Is this possible from a basic, stripped down Linux box to a group of identified, on a domain, Windows boxes (of course, I have the correct Win creds)?
So you seem to like challenges.
Windows is extremely bad at these kind of things. They tried to patch Windows here and there so a few overly complicated methods can be used to carry out rudimentary tasks.
One of those patches is called Powershell. It seems to be possible to do Powershell over SSH and that should your the solution. Google for "Powershell over SSH" and you'll find some information.
some of them obviously possible, some of them may require windows related knowledge.
Especially how do you want to execute commands on which version of windows (like how to find scheduled tasks)?
Command line is fine, Powershell as well. All systems will be Win7 to Win10 with at least Powershell v2 available, v5 where I've already had my hands on them. :-)
Windows is extremely bad at these kind of things. They tried to patch Windows here and there so a few overly complicated methods can be used to carry out rudimentary tasks.
One of those patches is called Powershell. It seems to be possible to do Powershell over SSH and that should your the solution. Google for "Powershell over SSH" and you'll find some information.
jlinkels
PoSH over SSH? I've played a decent amount in PoSH and never even heard that referenced. I'll start looking. Thanks for the lead. Like I said with this post, didn't have a clue where to begin. Will check in in a couple of days with what I can find.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.