Unsolved
This post is more than 5 years old
44 Posts
0
19087
how to query client OS type using nsradmin
Hi,
I'm seeking a way to query the OS type of my NetWorker 8.0 clients. Using nsradmin it will give me the following types
nsradmin> type
Known types: NSR auditlog, NSR log, NSR peer information,
NSR remote agent, NSR system port ranges, NSRLA;
In Powerlink the way to find out the OS type is using the NSR Client type, but it is not listed anymore. Has this changed in NW 8, or do I have to use a hidden switch to get access to "OS type"?
Many thanks
Christian
bingo.1
2.4K Posts
0
July 11th, 2013 11:00
You can even do this remotely from the NW server:
C:\>nsradmin -p nsrexec -s
NetWorker administration program.
Use the "help" command for help.
nsradmin>
nsradmin> . type: NSRLA; name:
Current query set
nsradmin>
nsradmin> show OS
nsradmin>
nsradmin> p
OS: Windows Server 2012 6.2;
nsradmin>
nsradmin> q
C:\>
Good luck
TimQuan
2 Intern
2 Intern
•
1.2K Posts
0
July 11th, 2013 20:00
To query OS type of current client:
Run the following command on the current client:
nsradmin –p nsrexec –s
. type: NSRLA; name: ;
show client OS type
p
To query OS types of all clients:
Run the following command on the NetWorker server:
nsradmin
. type: nsr client
show client OS type
p
Brian91_4544b4
71 Posts
0
July 12th, 2013 03:00
You might also want the client name, too
nsradmin
. type: nsr client
show client OS type;name
p
Brian
DavidHampson-rY
294 Posts
1
July 12th, 2013 03:00
To clarify things a little, the Networker client gathers up various pieces of data about the client (including OS version) which it stores in {installpath}|nsr|res|nsrladb folders; when the server runs a backup with that client some of this data will be sent back to the resources database on the backup server (if you have just created a client in NMC these fields will not be populated until a backup occurs).
You can access the client-side nsrladb resource with:
nsradmin -p 390113 -s clientname
nsradmin -p nsrexec -s clientname
If you leave off the -s clientname it will look at the resources of the local machine which if you are on the backup server will be an nsrla resource specific to the server so bear that in mind.
At the nsradmin prompt query type NSRLA and look for client OS type field (there is also a field called OS and it seems that for different OS type/Networker version combinations either/or each of these fields will be populated).
. type:NSRLA
show OS;client OS type
print
You can also do this on the backup server resources if you have had backups with this client:
nsradmin -s servername (can be ran from any Networker client)
. type:NSR client;name:clientname
show name;client OS type
print
TimQuan
2 Intern
2 Intern
•
1.2K Posts
0
July 15th, 2013 19:00
Hi Thread Starter,
Do these suggestions work for you?
Regards,
Tim
chrygel
44 Posts
0
July 16th, 2013 23:00
Hi Tim,
many thanks for all the answers and suggestions!
Unfortunately, if I direct the request to the server it will not show any details about the OS but:
client OS type: Windows NT Server on Intel;
I'd like to find out if a client has Windows 2012, 2008 or 2003 installed. It seems that the server don't know about the version details. I'm wondering how the Client Configuration Wizard knows it?
I'd highly appreciate if one knows a way to query the OS version details from the servers' database.
Best regards
Christian
bingo.1
2.4K Posts
0
July 17th, 2013 01:00
Of course NetWorker is not Windows.
If you want to have it more precise let me suggest that you use powershell.
These are the core commands of a script i prepared a while ago:
$inputfile = "D:\client_list.txt"
$outputfile = "D:\all_windows_client_os_list.txt"
$clients = Get-content $inputfile
#
touch($outputfile)
#
ForEach($I in $clients)
{
if ($I -like "*-4*") {} else
{
$OS = (Get-WmiObject Win32_OperatingSystem -Comp $I ).Caption
$out = $I + " : " + $OS
out-file -encoding ascii -filepath $outputfile -inputobject $out -append
}
}
So with the input file ...
D:\>more all_clients.txt
client-1
client-2
client-3
D:\>
... you might receive an output file like this:
D:\>more all_windows_client_os_list.txt
client-1 : Microsoft(R) Windows(R) Server 2003, Standard Edition
client-2 : Microsoft Windows Server 2008 R2 Standard
client-3 : Microsoft Windows Server 2012 Standard
D:\>
Good luck.
pankajpal
9 Posts
0
March 18th, 2015 03:00
Hello,
Is there a way to get the OS version of operating system of all the clients. We are planning to upgrade the OS. So I wanted to get the OS version and any plugin installed on the networker client.
bingo.1
2.4K Posts
0
March 18th, 2015 04:00
See Tim's answer from above:
For the NW modules, such is not so easy due to different presentations with the various versions.
Let me suggest you verify that on these clients themselves.
ble1
2 Intern
2 Intern
•
14.3K Posts
0
March 23rd, 2015 07:00
He can use nsrpush to get version of clients/modules and use nsradmin collected data for OS version.
sddc_guy
159 Posts
0
March 23rd, 2015 08:00
i would suggest to use "the Shell from hell" if now Software inventory is in Place :-)
nmm an nw get registered in REGISTRY for uninstaller info
thus, the following code might help you to query that:
param(
$computername = $null
)
$code = {
get-itemproperty 'hklm:\software\microsoft\windows\currentversion\uninstall\*' |where-object { $_.DisplayName } |Select-Object DisplayName, DisplayVersion, Publisher
}
if ($computername)
{
Invoke-Command -ScriptBlock $code -computerName $computername |
Select-Object DisplayName, DisplayVersion, Publisher
}
else
{
Invoke-Command -ScriptBlock $code
}
Example
If i run that from my networker server:
PS C:\Scripts> .\get-software.ps1 | where publisher -match "EMC"
DisplayName DisplayVersion Publisher
----------- -------------- ---------
NetWorker Management Console Server 8.2.1 EMC Corporation
NetWorker 8.2.1 EMC Corporation
if i run that from my networker server to query node AAGNODE1 with NMM
.\get-software.ps1 -computername aagnode1
PS C:\Scripts> .\get-software.ps1 -computername aagnode1 | where publisher -match "EMC"
DisplayName DisplayVersion Publisher
----------- -------------- ---------
NetWorker Module for Microsoft 8.2.1 EMC Corporation
NetWorker 8.2.1 EMC Corporation
Another Possibility is remotely query the nsrpowersnap and irccd deamons:
PS C:\Scripts> Invoke-Command -ScriptBlock {get-process nsrpsd | select ProductVersion } -ComputerName aagnode1
ProductVersion PSComputerName RunspaceId
-------------- -------------- ----------
8.2.1.0.Build.681 aagnode1 068354f5-311c-4ae0-a93f-03a7b4ac8570
Worth mentioning that those utilities are part of labbuildr :-)
[Announcement] labbuildr released
[labbuildr] labbuildr unleashed series: networker scenarios