strComputer = "."
On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
' Chose computer name, registry tree and key path
'
hDefKey = HKEY_LOCAL_MACHINE
strKeyPath = "SOFTWARE\Veritas\NetBackup\CurrentVersion\"
Set oReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strSubKeyPath = strKeyPath & "\Config"
oReg.EnumValues hDefKey, strSubKeyPath, arrValueNames, arrTypes
For i = LBound(arrValueNames) To UBound(arrValueNames)
strValueName = arrValueNames(i)
if(strValueName = "Exclude") Then
oReg.GetMultiStringValue hDefKey, strSubKeyPath, strValueName, arrValues
For Each strValue in arrValues
if(UCASE(strValue)=UCASE("C:\pagefile.sys")) then
wscript.echo strValueName & " = " & strValue
end if
Next
ENd if
if(strValueName = "Server") Then
oReg.GetMultiStringValue hDefKey, strSubKeyPath, strValueName, arrValues
wscript.echo "------------"
wscript.echo "SERVERS LIST"
wscript.echo "------------"
For Each strValue in arrValues
'if(UCASE(strValue)=UCASE("C:\pagefile.sys")) then
wscript.echo strValue
'end if
Next
ENd if
Next
' Chose for Master Server
Const HKEY_CURRENT_USER = &H80000001
hDefKey = HKEY_CURRENT_USER
strKeyPath = "SOFTWARE\VERITAS\NetBackup\NetBackup Client\prodsupport"
Set oReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strSubKeyPath = strKeyPath & "\Settings"
oReg.EnumValues hDefKey, strSubKeyPath, arrValueNames, arrTypes
strValueName = "DefaultServerName"
oReg.GetStringValue hDefKey, strSubKeyPath, strValueName, strValue
wscript.echo "------------"
wscript.echo "Master Server = " & strValue
On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
' Chose computer name, registry tree and key path
'
hDefKey = HKEY_LOCAL_MACHINE
strKeyPath = "SOFTWARE\Veritas\NetBackup\CurrentVersion\"
Set oReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strSubKeyPath = strKeyPath & "\Config"
oReg.EnumValues hDefKey, strSubKeyPath, arrValueNames, arrTypes
For i = LBound(arrValueNames) To UBound(arrValueNames)
strValueName = arrValueNames(i)
if(strValueName = "Exclude") Then
oReg.GetMultiStringValue hDefKey, strSubKeyPath, strValueName, arrValues
For Each strValue in arrValues
if(UCASE(strValue)=UCASE("C:\pagefile.sys")) then
wscript.echo strValueName & " = " & strValue
end if
Next
ENd if
if(strValueName = "Server") Then
oReg.GetMultiStringValue hDefKey, strSubKeyPath, strValueName, arrValues
wscript.echo "------------"
wscript.echo "SERVERS LIST"
wscript.echo "------------"
For Each strValue in arrValues
'if(UCASE(strValue)=UCASE("C:\pagefile.sys")) then
wscript.echo strValue
'end if
Next
ENd if
Next
' Chose for Master Server
Const HKEY_CURRENT_USER = &H80000001
hDefKey = HKEY_CURRENT_USER
strKeyPath = "SOFTWARE\VERITAS\NetBackup\NetBackup Client\prodsupport"
Set oReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strSubKeyPath = strKeyPath & "\Settings"
oReg.EnumValues hDefKey, strSubKeyPath, arrValueNames, arrTypes
strValueName = "DefaultServerName"
oReg.GetStringValue hDefKey, strSubKeyPath, strValueName, strValue
wscript.echo "------------"
wscript.echo "Master Server = " & strValue
No comments:
Post a Comment