Command Line from Windows Servers
Posted: Tue Sep 29, 2020 6:37 am
Hi everyone,
I need some advise please.
I have come across this article:
https://serverfault.com/questions/58966 ... dows-linux
This is basically what I am trying to achieve. Once the host is shutdown a script executes that places the host into downtime.
This aforementioned article stipulates that its for both Windows and Linux.
How would I run the following script from a Windows server? Is it even possible?
now=`date +%s`
#Check first path nagios.cmd & printf
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu] DISABLE_HOST_NOTIFICATIONS;my-host\n" $now > $commandfile
Any help greatly appreciated apologies if I am asking silly questions
I need some advise please.
I have come across this article:
https://serverfault.com/questions/58966 ... dows-linux
This is basically what I am trying to achieve. Once the host is shutdown a script executes that places the host into downtime.
This aforementioned article stipulates that its for both Windows and Linux.
How would I run the following script from a Windows server? Is it even possible?
now=`date +%s`
#Check first path nagios.cmd & printf
commandfile='/var/lib/nagios3/rw/nagios.cmd'
/usr/bin/printf "[%lu] DISABLE_HOST_NOTIFICATIONS;my-host\n" $now > $commandfile
Any help greatly appreciated apologies if I am asking silly questions