Connect to console app running as a system task on Windows server - scheduled-tasks

I run several game servers on a single windows-server-2012-r2. Many of the game servers run as console-application. I have created scheduled-tasks to run each on windows startup even if I'm not logged on. I would like to be able to attach to the consoles of those apps when logged on to the server, similar to what can be done in linux. Perhaps I'm going about this in the wrong way. Is there a way to attach to console apps running as tasks? Is there a software tool that accommodates this sort of thing?
Update:
Been searching high and low for a solution but haven't found anything yet. Have decided to write a wrapper for console app that will redirect Stdin, Stdout and Stderr of a process to a Telnet connection. Will use nssm to run the wrapper as a service.

I produced a solution: https://github.com/ccourson/Banjo
Banjo will launch a specified console application and route its streams to and from a telnet connection.
Pull requests welcome.

Related

Connect to iDrac Virtual Console programmatically

I frequently connect to the virtual console provided by iDrac on many Dell servers which I manage. I'm looking for a way to connect to the virtual console programmatically, or whatever method that's faster than logging into the web interface manually and going through all the prompts.
Dell's racadm tool does not support this, apparently. iDrac is not set up with domain auth, just using a local account configured on iDrac. I would be connecting from a Windows machine, any browser.
Is there any way to automate this? Even partially?
I use a shell script for this, you can make a .bat file on Windows. See some simple instructions to start iDrac console from command line here

how to run swift server single process

I'm trying to run a swift based web server using Kitura on Ubuntu.
This is following command to start hello word server.
.build/debug/helloworld
I can launch standalone process using .build/debug/helloworld &
but launching with that creates multiple process if execute again.
Or I've to kill old process then start new If I want to run only single process.
I've followed following tutorial to get server up running. But don't want to use Bluemix to deploy application. Instead I want to launch it on AWS ubuntu.
http://www.kitura.io/en/starter/gettingstarted.html
I assume there must be more easy and proper way to do this.
As you can see I'm almost newbie for servers.
You have to kill the Kitura process in order to stop a Kitura Server app - there is no other way to stop it.
If you just want to test your server you can run it inside a screen session. Screen is an essential utility for managing remote servers via ssh.
If you want to run it properly as a service/daemon you should look into systemd.

Run batch file on remote pc *visibly* to logged on user

I've got a batch file dmx2vlc which will play a random video file through VLC-Player when called.
It works well locally but I need this to happen on another machine on the network (will be adhoc) and the result (VLC-Player playing the video) must be visible on the remote screen.
I've tried SSH, Powershell and PsExec, but both seem to run the batch file and the player in the session of the command line, even when applying a patch to allow multiple logins.
So IF I get to run the batch file it is never visible on screen.
Using Teamviewer and the like is no option as I need to be able to call all this programmatically from my dmx program.
I'm not bound to being able to call the batch directly, it would be sufficient for me if I could somehow trigger it to run.
Sadly latency is a problem here as we are talking about a lighting (thus dmx) environment.
Any hints would be greatly appreciated!
You can use PSexec if the remote system is XP with the interactive parameter if you state the session to interact with, 0 would probably be the console (person physically in front of the machine).
This has issues with Windows Vista and newer as it pops up a prompt to ask the user to change their display mode first.
From memory, you could create a scheduled task on the remote system pretty easily though and as long as it's interactive the user should see it.
Good luck.
Try using web interface. It is rather easy: VLC is running http server, and accessing particular URL from remote machine will give full control over VLC. Documentation can be found here

Testing AppServer/Database Availability Remotely in Progress 4GL

We have Progress appservers (OE 10.0B05) running on AIX UNIX and I want write some code to check if they are up and running. The code to check the appserver would be run from a WIN2008 server. I can pull up Progress Explorer on the WIN2008 server to check the status of the appservers, but I need to write some code that can check their status programatically.
Is there any way to programatically check whether my AIX UNIX Progress appserver is up and running from a remote WIN2008 server?
To get app server status information you can use "asbman".
To get it remotely you would need some means to invoke a remote process and return a value. I'm a unix guy so I usually use "ssh" for that sort of thing.
There are Windows versions of SSH (look at the PuTTY suite for a really good free option). If you set it up to use pre-shared keys or an "agent" there are no messy login prompts to get in the way. Something like (untested):
plink -i sshkey.ppk user#server.name "asbman -name appServer -query"
"asbman" also supports -host and -port parameters if you happen to have it running on the windows box that you want to make the inquiry from.
If you have a small program that can open a socket connection, that would do it. If the program can open a socket, you can be reasonably confident the appserver is running.
You -might- be able to use the ABL SOCKET functionality to do this. Failing that, any other program which can open a socket on a remote machine and then close it will work.b

Running a cgi perl script as an Administrator

I'm writing a perl script for a website, and I need to be able to control VirtualBox via the website. I'm not sure where to start, or if I'm even trying to debug in the right area, but here goes.
My server is running IIS7 on Windows Server 2008 R2. I'm also running 2 virtual machines through the vboxmanage command line interface. These VMs are running under SERVER\administrator.
When I open my website, it requests a login. I login to the website as SERVER\administrator and click a link that calls my script using an xmlhttprequest. Now, normally, it doesn't matter what user I run these as, but with vboxmanage, if I run the command as a different user, the list of VMs is different. I tried whoami, which returned SERVER\administrator, but %DOMAINNAME%\%USERNAME% returns the domain that the server is connected to as dommainname and SERVER$ as the username. The vboxmanage command then fails.
On the website, impersonation is turned on. When I turn impersonation off, the whoami request changes to be iis apppool\website. Any ideas on how to get around this?
As a final note, I've thought about using runas, but since it prompts for a password, there's no way to call it through scripting (and that would be a poor security decision, I'd imagine).
This is an oft recurring, well-known and well-solved problem. Instead of having one big program dealing with requests from the Web and managing the VM (strong coupling), separate the concern and write two programs, each doing exactly one task.
The user facing program running in the Web server context can continue with limited privileges. The VM manager is a stand-alone program running with the necessary admin privileges, either repeatedly from the scheduler or as daemon/service.
Have the first communicate with the second over a message-queue.