Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Rahul Patil
at 2024-07-30 19:55:54
Point:500 Replies:8 POST_ID:829177USER_ID:12069
Topic:
Microsoft Operating Systems;;
HI,
I am looking for a batch script which can check perticular service status on 4-5 servers from my desktop and retrives output to a file.Could you please advice?
Regards,
Rahul
I am looking for a batch script which can check perticular service status on 4-5 servers from my desktop and retrives output to a file.Could you please advice?
Regards,
Rahul
Expert: rastoi replied at 2024-08-07 15:01:14
Sysinternals are common admin tools from microsoft not 3rd psrty.
Can you try those commands against server(s):
Net use \serveripc$ /user:username
It should ask for password. Let me know error if any. If it pass run this
Sc \server query reservicename
Can you try those commands against server(s):
Net use \serveripc$ /user:username
It should ask for password. Let me know error if any. If it pass run this
Sc \server query reservicename
Author: Rahul Patil replied at 2024-08-07 13:34:22
Hi Rastoi,
Appreciate your help but unfortunately I do not have right to install any third party app :(.Kindly adviceif there is any other way or batch script to perform similar activity.
Regards,
Rahul
Appreciate your help but unfortunately I do not have right to install any third party app :(.Kindly adviceif there is any other way or batch script to perform similar activity.
Regards,
Rahul
Expert: rastoi replied at 2024-08-06 10:13:18
1. please download and unpack sysinternals suite on your workstation
http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
2. but test connectivity to your remote servers using psservice. From command line in folder where you place sysinternals run:
psservice \targetserver -u user -p password query rsaservicename
for each your server.
3. if this will work,you can just put all testing lines to one cmd and you have simple script.
4. if it will work you can use similar approach for replications using properly parametrized "psloglist" from suite
http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
2. but test connectivity to your remote servers using psservice. From command line in folder where you place sysinternals run:
psservice \targetserver -u user -p password query rsaservicename
for each your server.
3. if this will work,you can just put all testing lines to one cmd and you have simple script.
4. if it will work you can use similar approach for replications using properly parametrized "psloglist" from suite
Author: Rahul Patil replied at 2024-08-04 10:12:33
HI,
I am using windows xp to RDP to the RSA serevrs.While manual check I mstsc/RDP to each serevr and then check RSA service status manually.For replication checks I filter eventviewer Appliaction logs with RSA and check replication status for all replicas.Looking for automation/Batch script will be ok.I guess i can not use powershell as I am using xp :(.Kindly advice
Regards,
Rahul
I am using windows xp to RDP to the RSA serevrs.While manual check I mstsc/RDP to each serevr and then check RSA service status manually.For replication checks I filter eventviewer Appliaction logs with RSA and check replication status for all replicas.Looking for automation/Batch script will be ok.I guess i can not use powershell as I am using xp :(.Kindly advice
Regards,
Rahul
Expert: rastoi replied at 2024-07-31 23:40:00
Hi Rahul,
1. I can tune for you batch, but need more information. How are you checking the RSA status manually ? Are you going to authentication interface or just queriing its service status? What are the OS on servers and source for checking (your workstation?). Is powershell good for you too? Please be a bit more descriptive.
2. extending question to different topic is not in line with EE rules. Please raise extra question for replication checking and be more descriptive on what do you need. What kind of replication? are there exact records you want to be aware of? what should be an action resulting from such check ?
Kind regards, Rasto
1. I can tune for you batch, but need more information. How are you checking the RSA status manually ? Are you going to authentication interface or just queriing its service status? What are the OS on servers and source for checking (your workstation?). Is powershell good for you too? Please be a bit more descriptive.
2. extending question to different topic is not in line with EE rules. Please raise extra question for replication checking and be more descriptive on what do you need. What kind of replication? are there exact records you want to be aware of? what should be an action resulting from such check ?
Kind regards, Rasto
Author: Rahul Patil replied at 2024-07-31 18:43:18
Hi,
I want to check RSA service status on 8 severs.For each server different credentials will be used.I just need an output in a file stating weather RSA service is up or not.Also need to check repliction status in application logs automatically.Could you please help?
Regards,
Rahul
I want to check RSA service status on 8 severs.For each server different credentials will be used.I just need an output in a file stating weather RSA service is up or not.Also need to check repliction status in application logs automatically.Could you please help?
Regards,
Rahul
Expert: rastoi replied at 2024-07-31 04:08:13
this way ? Just provide in current path "servers.txt" one target per line and change "bits" in my example to your desired service
for /f %%i in (servers.txt) do (for /f "tokens=4" %%a in ('"sc \%%i query bits |findstr /i "state""') do (echo %DATE% %TIME% %%i %%a >>log.txt)) 1:2:3:4:
and I used this like chance to refresh my powershell fomatting. Here is PS 3.0 one liner example
Get-Content .servers.txt | % {Get-Service -ComputerName $_ |? name -eq bits} | ft @{n='timestamp';e={get-date}},machinename, status -hide |Out-String -stream|? length -gt 0 |Out-File .log.txt -Append -Encoding utf8 1:2:3:
Expert: duncanb7 replied at 2024-07-30 20:11:21
what you want from service status ? what service is ? something like that Service.DisplayName , Service.ServiceAccountName ,Service.Path ,Service.Status..etc
Please write us more in detail & Please advise
Duncan
Please write us more in detail & Please advise
Duncan