Script sharing: reading remote registry entries

Hopefully of use for someone else. I had to write this up to create a report of versions for all of our middletier servers.
Cheers,
Greg Webster
Code:
' Read remote registries for Zenworks 7 installs
' Greg Webster
' ==============================================
strComputer = InputBox( "Server name: " )
Const HKEY_LOCAL_MACHINE = &H80000002
Set objRegistry = GetObject("winmgmts:\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "ZfD is " + strValue
strZfDVersion = "ZfD is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD\App Management Server"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "App Management Server is " + strValue
strAppMgmtVersion = "App Management Server is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD\Imaging Server"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "Imaging Server is " + strValue
strImgVersion = "Imaging Server is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD\Middle Tier Server"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "Middle Tier Server is " + strValue
strMTSVersion = "Middle Tier Server is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD\PXE Server"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "PXE Server is " + strValue
strPXEVersion = "PXE Server is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfD\Workstation Import Server"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "Workstation Import Server is " + strValue
strWkstnImpVersion = "Workstation Import Server is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfS"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "ZfS is " + strValue
strZfsVersion = "ZfS is " + strValue
End If
strKeyPath = "SOFTWARE\Novell\Zenworks\ZfS\PDS"
strValueName = "Version"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
Wscript.Echo "The registry key does not exist."
Else
'Wscript.Echo "PDS is " + strValue
strPDSVersion = "PDS is " + strValue
End If
Wscript.Echo "Registry entries for " + strComputer + ":" + VBCr + strZfDVersion + VBCr + strAppMgmtVersion + VBCr + strImgVersion + VBCr + strMTSVersion + VBCr + strPXEVersion + VBCr + strWkstnImpVersion + VBCr + strZfsVersion + VBCr + strPDSVersion

GregWebster,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/

Similar Messages

  • Reading Registry entry from Java

    Dear experts,
    I need to read the registry entry's value "HKEY_CURRENT_USER\Control Panel\International\sShortDate"
    from Java.
    Will anybody help?
    Thanks for future response
    Unique

    Do you really think it is a good idea to tie a program written in a language whose main
    strong point is being platform-independent to a specific platform just to get a date format ?
    You might want to take a look at http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
    regards
    Holger

  • Script to open Remote Login in "sharing" not working after move to 10.5

    Under 10.4 I sued the following script to open Remote Login (tick the box). Under 10.5.6 it does not work.
    do shell script "/usr/bin/open /System/Library/PreferencePanes/SharingPref.prefPane"
    activate application "System Preferences"
    tell application "System Events"
    tell process "System Preferences"
    click checkbox 1 of row 6 of table 1 of scroll area 1 of tab group 1 of window "Sharing"
    delay 3
    tell application "System Events"
    quit application "System Preferences"
    end tell
    end tell
    end tell
    I get the following error:
    System Events got an error: Can’t get tab group 1 of window "Sharing" of process "System Preferences". Invalid index.
    Anybody know why?

    give this a spin
    activate application "System Preferences"
    tell application "System Events"
    tell process "System Preferences"
    click button "Sharing" of scroll area 1 of window "System Preferences"
    select scroll area 1 of group 1 of window "Sharing"
    select static text "File Sharing" of row 3 of table 1 of scroll area 1 of group 1 of window "Sharing"
    select checkbox 1 of row 3 of table 1 of scroll area 1 of group 1 of window "Sharing"
    click button "Options…" of splitter group 1 of group 1 of window "Sharing"
    click checkbox "Share files and folders using FTP" of sheet 1 of window "Sharing"
    delay 0.5
    select button 2 of sheet 1 of window "Sharing"
    keystroke return
    delay 0.5
    tell application "System Events"
    quit application "System Preferences"
    end tell
    end tell
    end tell
    -----------------

  • Registry entry to force install of reader updates?

    Greetings!
    I've been trying to deploy Reader updates across our network via GPO but it's been a real, real hassle. Also, because some of the client PCs are connected via slow links the install time is sometimes excruciatingly long (computer configured GPO).
    SMS is not an option right now, so I'm thinking that rather than use GPO to centrally manage reader updates I throw up my arms and leave it up to the users. So my question is if there is some sort of a registry setting that will force Reader updates to install once they are downloaded from the Internet. Or, alternatively, if there some sort of login script available that would check if there was a Reader update available for installation and forcibly install it. Or, alternatively, if anyone has figured out a better way to deal with the Reader GPO deployment nightmare. 

    Hi,
    Well, as you mentioned, GPO would have been the best option to update across an enterprise network. You can refer to the guide at http://kb2.adobe.com/cps/837/cpsid_83709/attachments/Acrobat_Enterprise_Administration.pdf. It may give you some more tips on how to maybe change your settings to ensure a speedy install.
    As far as your second question is concerned, you can use the "Automatically Install Updates" option for the Reader Updater, which will automatically install the updates as and when it downloads any. The registry entry to set the same is as below:
    Prior to Reader 10.1:
    [HKLM]\Software\Adobe\Adobe ARM\1.0\ARM\
    Name: iCheck (DWORD)
    Value: 3
    Post Reader 10.1:
    [HKLM]\Software\Adobe\Adobe ARM\1.0\ARM\
    Name: iCheckReader (DWORD)
    Value: 3
    You can set the same using a login script via GPO itself. This will ensure that any and all updates as and when available will be installed as soon as its downloaded, provided no process of Reader is running at that time.
    For more details on all the configurations on the updater preferences, please refer to the following document:
    http://kb2.adobe.com/cps/837/cpsid_83709/attachments/Acrobat_Reader_Updater.pdf
    Hope this helps
    Ankit

  • I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.

    I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.
    I don't want it to be an EEM Event, I just want to run it from the (tcl)# prompt.
    So I guess I'm asking if you can use cli_exec and other commands in the "namespace import ::cisco::eem::*" in a normal non-EEM script - can I do that?
    This is the error I get:
    OTN.159(tcl)#source flash:TCL_SNMP_Remote_Read.tcl
    invalid command name "::cisco::eem::event_register_none"             ^
    % Invalid input detected at '^' marker.
    What am I missing?
    =================  TCL_SNMP_Remote_Read.tcl  ==============================
    ::cisco::eem::event_register_none
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if [catch {cli_open} RESULT]
        { error $RESULT $errorInfo }
        else { array set cli1 $RESULT }
    if [catch {cli_exec $cli1(fd) "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0" } RESULT]
           { error $RESULT $errorInfo  }
           else { set SnmpSysDesc $RESULT }
    if [catch {cli_close $cli1(fd) $cli1(tty_id)} RESULT] {
                error $RESULT $errorInfo
    puts $SnmpSysDesc
    =========================================================================
    In the sho-run config I have:
    event manager directory user policy "flash:/"
    event manager session cli username "cisco"
    Any help to get me started would be greatly appreciated!
    Tim

    If you don't want an EEM policy, then don't use any of the EEM constructs.  Instead, all you need is this:
    set output [exec "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0"]puts $output

  • I need a fix from HP which outlined how to remove the registry entries which were stopping recognition of the cd/dvd reader but then itunes cannot find the reader.

    I need a fix from HP which outlined how to remove the registry entries which were stopping recognition of the cd/dvd reader but then itunes cannot find the reader.

    Thanks for pointing that out, it was not apparent on the day i used them and wrote the How-To. The links have been replaced with the SID# (Solution ID #) and the title given for the Article.
    Have fun

  • Can't read registry entry AppPath... - My solution

    Good news! For me, there was a simple solution when I got this error message. (Some background: We just upgraded Office to 2007 and RoboHelp 8 from RoboHelp 5.) Today when I tried to open RoboHelp for Word (version 8) for the first time, I received this error message:
    "Can't read registry entry AppPath. RoboHelp may not be installed properly.
      Re-install RoboHelp if you continu to get this message."
    Actually, I didn't need to do anything major to successfully open RoboHelp for Word. The solution seemed to be simply to open RoboHelp for Word BEFORE opening Word. (Apparently, in my original attempt, I already had Word open.) So I rebooted my PC, and opened RoboHelp-for-Word first, and (Yeah!), RoboHelp for Word opened just fine.
    Perhaps this will help someone else.

    This forum is maintained by users of RoboHelp, not by Adobe, so your comments will not be seen by them.
    You say you are dissappointed with the Adobe RoboHelp team but you don't say if you have been to Support and what they suggested.
    I'm not sure what the problem is but I do know you cannot have more than one version of RoboHelp for Word installed on one PC. Maybe that is the cause.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Please assist with modifying this script to read in a list of servers and output results to excel

    Hello,
    I have an excellent script written by Brian Wilhite to gather the last logged in user using Powershell.
    http://gallery.technet.microsoft.com/scriptcenter/Get-LastLogon-Determining-283f98ae/view/Discussions#content
    My Powershell Fu is stumbling to modify this script to the following requirements:
    Currently the script must be loaded first into Powershell, then it can be executed.  I would rather edit the script in my Powershell ISE, add the .txt file to the script itself that gives a list of the servers I need to scan.  Then when I
    press Run Script in my ISE it executes.
    I would also like to output the results of the file to excel (.xls or .csv will do).  Currently the results look as follows:
    Computer : SVR01
    User : WILHITE\BRIAN
    SID : S-1-5-21-012345678-0123456789-012345678-012345
    Time : 9/20/2012 1:07:58 PM
    CurrentlyLoggedOn : False
    I would prefer it shows up like so:
    Computer User SID Time Currently LoggedOn
    SVR01 WILHITE\BRIAN S-1xxx 9/20/2012 1:07:58 PM FalseSRV02 WILHITE\BRIAN S-2xxx 9/26/2014 10:00:00 AM True
    Any help you can provide would be greatly appreciated.  I'll add the full script to the end of this post.
    Thank you.
    Function Get-LastLogon
    <#
    .SYNOPSIS
    This function will list the last user logged on or logged in.
    .DESCRIPTION
    This function will list the last user logged on or logged in. It will detect if the user is currently logged on
    via WMI or the Registry, depending on what version of Windows is running on the target. There is some "guess" work
    to determine what Domain the user truly belongs to if run against Vista NON SP1 and below, since the function
    is using the profile name initially to detect the user name. It then compares the profile name and the Security
    Entries (ACE-SDDL) to see if they are equal to determine Domain and if the profile is loaded via the Registry.
    .PARAMETER ComputerName
    A single Computer or an array of computer names. The default is localhost ($env:COMPUTERNAME).
    .PARAMETER FilterSID
    Filters a single SID from the results. For use if there is a service account commonly used.
    .PARAMETER WQLFilter
    Default WQLFilter defined for the Win32_UserProfile query, it is best to leave this alone, unless you know what
    you are doing.
    Default Value = "NOT SID = 'S-1-5-18' AND NOT SID = 'S-1-5-19' AND NOT SID = 'S-1-5-20'"
    .EXAMPLE
    $Servers = Get-Content "C:\ServerList.txt"
    Get-LastLogon -ComputerName $Servers
    This example will return the last logon information from all the servers in the C:\ServerList.txt file.
    Computer : SVR01
    User : WILHITE\BRIAN
    SID : S-1-5-21-012345678-0123456789-012345678-012345
    Time : 9/20/2012 1:07:58 PM
    CurrentlyLoggedOn : False
    Computer : SVR02
    User : WILIHTE\BRIAN
    SID : S-1-5-21-012345678-0123456789-012345678-012345
    Time : 9/20/2012 12:46:48 PM
    CurrentlyLoggedOn : True
    .EXAMPLE
    Get-LastLogon -ComputerName svr01, svr02 -FilterSID S-1-5-21-012345678-0123456789-012345678-012345
    This example will return the last logon information from all the servers in the C:\ServerList.txt file.
    Computer : SVR01
    User : WILHITE\ADMIN
    SID : S-1-5-21-012345678-0123456789-012345678-543210
    Time : 9/20/2012 1:07:58 PM
    CurrentlyLoggedOn : False
    Computer : SVR02
    User : WILIHTE\ADMIN
    SID : S-1-5-21-012345678-0123456789-012345678-543210
    Time : 9/20/2012 12:46:48 PM
    CurrentlyLoggedOn : True
    .LINK
    http://msdn.microsoft.com/en-us/library/windows/desktop/ee886409(v=vs.85).aspx
    http://msdn.microsoft.com/en-us/library/system.security.principal.securityidentifier.aspx
    .NOTES
    Author: Brian C. Wilhite
    Email: [email protected]
    Date: "09/20/2012"
    Updates: Added FilterSID Parameter
    Cleaned Up Code, defined fewer variables when creating PSObjects
    ToDo: Clean up the UserSID Translation, to continue even if the SID is local
    #>
    [CmdletBinding()]
    param(
    [Parameter(Position=0,ValueFromPipeline=$true)]
    [Alias("CN","Computer")]
    [String[]]$ComputerName="$env:COMPUTERNAME",
    [String]$FilterSID,
    [String]$WQLFilter="NOT SID = 'S-1-5-18' AND NOT SID = 'S-1-5-19' AND NOT SID = 'S-1-5-20'"
    Begin
    #Adjusting ErrorActionPreference to stop on all errors
    $TempErrAct = $ErrorActionPreference
    $ErrorActionPreference = "Stop"
    #Exclude Local System, Local Service & Network Service
    }#End Begin Script Block
    Process
    Foreach ($Computer in $ComputerName)
    $Computer = $Computer.ToUpper().Trim()
    Try
    #Querying Windows version to determine how to proceed.
    $Win32OS = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer
    $Build = $Win32OS.BuildNumber
    #Win32_UserProfile exist on Windows Vista and above
    If ($Build -ge 6001)
    If ($FilterSID)
    $WQLFilter = $WQLFilter + " AND NOT SID = `'$FilterSID`'"
    }#End If ($FilterSID)
    $Win32User = Get-WmiObject -Class Win32_UserProfile -Filter $WQLFilter -ComputerName $Computer
    $LastUser = $Win32User | Sort-Object -Property LastUseTime -Descending | Select-Object -First 1
    $Loaded = $LastUser.Loaded
    $Script:Time = ([WMI]'').ConvertToDateTime($LastUser.LastUseTime)
    #Convert SID to Account for friendly display
    $Script:UserSID = New-Object System.Security.Principal.SecurityIdentifier($LastUser.SID)
    $User = $Script:UserSID.Translate([System.Security.Principal.NTAccount])
    }#End If ($Build -ge 6001)
    If ($Build -le 6000)
    If ($Build -eq 2195)
    $SysDrv = $Win32OS.SystemDirectory.ToCharArray()[0] + ":"
    }#End If ($Build -eq 2195)
    Else
    $SysDrv = $Win32OS.SystemDrive
    }#End Else
    $SysDrv = $SysDrv.Replace(":","$")
    $Script:ProfLoc = "\\$Computer\$SysDrv\Documents and Settings"
    $Profiles = Get-ChildItem -Path $Script:ProfLoc
    $Script:NTUserDatLog = $Profiles | ForEach-Object -Process {$_.GetFiles("ntuser.dat.LOG")}
    #Function to grab last profile data, used for allowing -FilterSID to function properly.
    function GetLastProfData ($InstanceNumber)
    $Script:LastProf = ($Script:NTUserDatLog | Sort-Object -Property LastWriteTime -Descending)[$InstanceNumber]
    $Script:UserName = $Script:LastProf.DirectoryName.Replace("$Script:ProfLoc","").Trim("\").ToUpper()
    $Script:Time = $Script:LastProf.LastAccessTime
    #Getting the SID of the user from the file ACE to compare
    $Script:Sddl = $Script:LastProf.GetAccessControl().Sddl
    $Script:Sddl = $Script:Sddl.split("(") | Select-String -Pattern "[0-9]\)$" | Select-Object -First 1
    #Formatting SID, assuming the 6th entry will be the users SID.
    $Script:Sddl = $Script:Sddl.ToString().Split(";")[5].Trim(")")
    #Convert Account to SID to detect if profile is loaded via the remote registry
    $Script:TranSID = New-Object System.Security.Principal.NTAccount($Script:UserName)
    $Script:UserSID = $Script:TranSID.Translate([System.Security.Principal.SecurityIdentifier])
    }#End function GetLastProfData
    GetLastProfData -InstanceNumber 0
    #If the FilterSID equals the UserSID, rerun GetLastProfData and select the next instance
    If ($Script:UserSID -eq $FilterSID)
    GetLastProfData -InstanceNumber 1
    }#End If ($Script:UserSID -eq $FilterSID)
    #If the detected SID via Sddl matches the UserSID, then connect to the registry to detect currently loggedon.
    If ($Script:Sddl -eq $Script:UserSID)
    $Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]"Users",$Computer)
    $Loaded = $Reg.GetSubKeyNames() -contains $Script:UserSID.Value
    #Convert SID to Account for friendly display
    $Script:UserSID = New-Object System.Security.Principal.SecurityIdentifier($Script:UserSID)
    $User = $Script:UserSID.Translate([System.Security.Principal.NTAccount])
    }#End If ($Script:Sddl -eq $Script:UserSID)
    Else
    $User = $Script:UserName
    $Loaded = "Unknown"
    }#End Else
    }#End If ($Build -le 6000)
    #Creating Custom PSObject For Output
    New-Object -TypeName PSObject -Property @{
    Computer=$Computer
    User=$User
    SID=$Script:UserSID
    Time=$Script:Time
    CurrentlyLoggedOn=$Loaded
    } | Select-Object Computer, User, SID, Time, CurrentlyLoggedOn
    }#End Try
    Catch
    If ($_.Exception.Message -Like "*Some or all identity references could not be translated*")
    Write-Warning "Unable to Translate $Script:UserSID, try filtering the SID `nby using the -FilterSID parameter."
    Write-Warning "It may be that $Script:UserSID is local to $Computer, Unable to translate remote SID"
    Else
    Write-Warning $_
    }#End Catch
    }#End Foreach ($Computer in $ComputerName)
    }#End Process
    End
    #Resetting ErrorActionPref
    $ErrorActionPreference = $TempErrAct
    }#End End
    }# End Function Get-LastLogon

     This should work:
    Get-LastLogon -Computername (Get-content .\Servers.txt) | Export-CSV .\Output.csv -NoTypeInformation
    I just tested it on my test domain and it did the trick.

  • Remote registry: OpenRemoteBaseKey not working

    Hi
    I'm trying to read a remote registry key. I have the Remote Registry service running on on the target machine, and I can read the key using `reg query`. In all honesty, this is good enough for my purposes.
    PS C:\> reg query "\\remote-machine\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer" /v VersionHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer    Version    REG_SZ    9.11.9600.17420
    However, I'm curious to know why I can't do this with Powershell and OpenRemoteBaseKey. I've tried the following steps
    from here:
    PS C:\> $remote = "remote-machine"PS C:\> $type = [Microsoft.Win32.RegistryHive]::LocalMachine
    PS C:\> $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($type, $remote )
    PS C:\> $regpath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer"
    PS C:\> $productkey = $reg.OpenSubKey($regpath)
    PS C:\> $productkey.getvalue("Version")
    You cannot call a method on a null-valued expression.
    At line:1 char:1
    + $productkey.getvalue("Version")
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
    Inspecting the values produced, $productkey is null, and $reg appears to be empty:
    PS C:\> $reg
    Name Property
    PS C:\> $reg.GetType()
    IsPublic IsSerial Name BaseType
    True False RegistryKey System.MarshalByRefObject
    PS C:\>
    So, why would `reg query` work, while `OpenRemoteBaseKey()` does not? I can use `reg query` well enough in my scripts, but I'd prefer something a little more Powershell-y.
    Cheers

    When you update IE, it does not necessarily update the 'Version' value in the registry.
    -- Bill Stewart [Bill_Stewart]
    Okay. Are you referring to what is stated in the following paragraph from the same page you linked before?
    Internet Explorer 3.x does not add the version value to the registry. Instead, it adds a "build" value to the same registry key and updates the "IVer" string value to "103." For backward compatibility, Internet Explorer 4.0 and later versions change or add the build value. For Internet Explorer 3.x, the build value is a string that contains the four-character build number. (For example, "1300" is the build value for Internet Explorer 3.02). For Internet Explorer 4.0 and later versions, the build value is a string that contains a five-character value, followed by a period and four more characters, in the following format:
    If so, I think it does not apply after IE4. In which case, as all the machines on my domain are Windows 7 or Server 2008 installs, I don't think it's likely that they have such an old version installed.

  • Hyper-V Cluster went wacky, ERROR_TIMEOUT (1460), Remote Administration, Remote Registry

    Each Hyper-V host is a Windows 2012 Server
    Each host is Connected to a Dell Powervault MD3260 via Dual SAS Cables. 
    We started getting Errors similar to the Following:
    Log Name: System
    Source: Microsoft-Windows-FailoverClustering
    Date: 9/22/2014 12:01:24 PM
    Event ID: 5142
    Task Category: Cluster Shared Volume
    Level: Error
    Keywords:
    User: SYSTEM
    Computer: SVR-HBG-VM4.HAYDON-MILL.COM
    Description:
    Cluster Shared Volume 'VSVR_File_Data' ('VSVR_File_Data') is no longer accessible from this cluster node because
    of error 'ERROR_TIMEOUT(1460)'. Please troubleshoot this node's connectivity to the storage device and network connectivity.
    The CSV Resources that were giving the Timeout Errors were all managed on one specific host, other CSVs on the Powervault were all working fine form the Host reporting the timeout error. 
    Each of the Host then started to have issues with timeouts to other CSV.   Dell Tech Support interrogated the Powervault and found no issued with the Connectivity and no events were present on the Powervault indicating an issue. 
    Each of the Host would then hand in Explorer, the Task bar would have no icons in the task bar and turn to hourglass when moving mouse to it.
    Failover Cluster Manager would sometimes work, then stop working, It would not update the status of the VMs. They would jsut stay at "Loading..." Hyper-V Manager would have similar issues.  
    We ended up Shutting down all of the VMs and the Cluster and then bringing it back online. Though in the Process we had to tweak some things, the DNS settings on the Hosts were pointing to a VM that was Offline that was fixed. We could not reconnect to the
    cluster after we turned on the Hosts.  We were getting RPC server unavailable. 
    I ended up turning off the Firewalls, resetting the NICs and things started to get better. 
    8 Minutes prior to the Issues did make a few GPO Changes. 
    Windows Firewall: Allow inbound Remote Desktop Exception Domain Profile
    was 10.0.0.0/8
    Changed to 10.0.0.0/8,10.1.0.0/16
    Windows Firewall: Allow inbound Remote Desktop Exception Standard Profile
    10.1.0.0/16, localsubnet
    Windows Firewall: Allow inbound Remote administration Exception Domain Profile
    was localsubnet,10.0.0.0/8
    Changed to localsubnet,10.0.0.0/8,10.1.0.0/16
    Windows Firewall: Allow inbound Remote administration Exception Standard Profile
    10.1.0.0/16, localsubnet
    Remote Registry Service
    Set to Manual Start
    So my Question is, could these changes of Affected the Hyper-V Hosts in the Cluster?
    Thanks!
       Scott<-

    I guess I don't see why what I did caused this?  The only Change that should of been a Limitation was the Remote Registry set to Manual. If the service on the Clusters was set to Automatic and I set it to Manual, I could see that happening. I removed
    that setting in the GPO, though I never altered the service on the Cluster Hosts afterwards.
    I Guess if in the Setup of the Cluster Hosts it Changed the Inbound Rules in the Firewall and then I limited them further, though I allowed the LocalSubnet and all of the Hosts are in the local subnet. 10.1.0.0/16. 
    One Host finally came back online and was able to start VMs and Connect to the cluster without stopping the firewall. Its firewall was only turned off later to match the other three hosts. 
    Do the Cluster Hosts use the ports for Remote Administration to Communicate to each other?
    Here is another thought, Do they communicate to each other via the Management Port or the Redundant Network Link?  the Redundant Channel Link is in 10.99.0.0/24  Though Each of the changes I made had either 
    10.0.0.0/8 which should be a super-set of 10.99.0.0/24 or it had LocalSubnet, which should be 10.99.0.0/24
    I just want to be sure that was really the cause and turning off the firewalls was not just masking another issue. 
    Thanks, 
      Scott<-

  • Amending script to read list of computers, run script and output to log file

    Hello all,
    I have cobbled together a script that runs and does what I want, now I would like to amend the script to read a list of computers rather than use the msg box that it is currently using for the strcomputer, if the computers doesn't respond to a ping, then
    log that, if it does continue with the script and when it is complete, log a success or failure. I have just started scripting and would really appreciate some help on this one,thanks. I created the script to fix an SCCM updates issue and failing task sequences,
    so it may prove useful to others.
    There are msg box entries that can be removed that were originally in there for the user running the script.
    'setting objects
    Dim net, objFSO, shell
    Dim objFile, strLine, intResult
    Set objnet = CreateObject("wscript.network")
    Set objFSO = CreateObject("scripting.filesystemobject")
    Set objshell = CreateObject("wscript.shell")
    strfile = "c:\wuafix\wuafix.vbs"
    strUser = "domain\user"
    strPassword = "password"
    'getting server name or IP address
    strComputer=InputBox("Enter the IP or computer name of the remote machine on which to repair the WUA agent:", "Starting WUA Fix")
    'check to see if the server can be reached
    Dim strPingResults
    Set pingExec = objshell.Exec("ping -n 3 -w 2000 " & strComputer) 'send 3 echo requests, waiting 2secs each
    strPingResults = LCase(pingExec.StdOut.ReadAll)
    If Not InStr(strPingResults, "reply from")>0 Then
    WScript.Echo strComputer & " did not respond to ping."
    WScript.Quit
    End If
    'Check if source file exists
    If Not objFSO.FileExists(strFile) Then
    WScript.Echo "The source file does not exist"
    WScript.Quit
    End If
    MsgBox "The WUA Fix is in process. Please wait.", 64, "Script Message"
    'mapping drive to remote machine
    If objFSO.DriveExists("Z:") Then
    objnet.RemoveNetworkDrive "Z:","True","True"
    End If
    objnet.MapNetworkDrive "Z:", "\\" & strComputer & "\c$", True
    'creating folder for install exe on remote machine
    If (objFSO.FolderExists("Z:\wuafix\") = False) Then
    objFSO.CreateFolder "Z:\wuafix"
    End If
    'copying vbs to remote machine
    objFSO.CopyFile strFile, "Z:\wuafix\wuafix.vbs"
    'set command line executable to run a silent install remotely
    strInstaller1 = "cscript.exe c:\wuafix\wuafix.vbs"
    'strInstaller2 = "c:\wuafix\wuafix.vbs"
    strExec = "c:\pstools\PsExec.exe "
    'objshell.Run strExec & " \\" & strComputer & strInstaller1
    On Error Resume Next
    result = objshell.Run(strExec & " \\" & strComputer & " " & strInstaller1)
    If Err.Number = 0 Then
    WScript.Echo "PSXEC Runing WUA fix remotely"
    Else MsgBox Err.Number
    MsgBox result
    End If
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colLoggedEvents = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NTLogEvent WHERE Logfile = 'Application' AND " _
    & "EventCode = '4'")
    Wscript.Echo "Event Viewer checked and Fix Applied:" & colLoggedEvents.Count
    MsgBox "Removing mapped drive Please wait.", 64, "Script Message"
    If objFSO.DriveExists("Z:") Then
    objnet.RemoveNetworkDrive "Z:","True","True"
    End If
    MsgBox "The WUA Fix has been applied.", 64, "Script Message"
    quit
    wscript.quit
    Any help appreciated and explanations on the process would be great as I would like to learn the process involved, which is difficult when working during the day.
    many thanks

    Hi Bill,
    long story short, I have approx. 2800 clients with an old entry in WMI for updates that the sccm client cannot clear or run because they do not exist anymore, so the client will not run updates or use a task sequence because of this, so my script fixes this
    and does a couple of other things, I have found another way to do this by running  a different script that uses WMI to call a cscript function that uses the wuafix.vbs that is coped to the machine, I am also changing the echo entries to output to a log
    file instead so that I can track what client has run the fix andn which ones haven't.
    If you have any suggestions then please let me know, nothing nefarious :)
    many thanks

  • Only One domain controller, Remote Registry service keeps DISABLING itself. Where in the registry could this be set?

    This is killing my remote management. I have 4 server 2012R2 domain controllers.  Only one of them is being affected with this problem.  Almost everytime I check, the remote registry service is disabled again.  It seems like there is a corrupt
    group policy preference that keeps on attacking during a policy refresh, but I can't imagine setting a group policy to disable this service.  It is needed for our remote management.  Also the IP Tunnel service is also disabling.  Another strange
    artifact is that when I set a Windows Firewall policy to add an exception for remote administration in a group policy to my Admin workstation, it seemed to set a firewall rule in other computers to block remote administration.  I can not figure out where
    else this strange Windows Firewall rule Blocking remote administration could have come from.  These may be related or they may not, but they are occuring on the same domain controller.  I am able to set the RemoteRegistry service to enabled and to
    start it (which I have done too many times now), but it constantly is being changed back to disabled.  I am searching the registry to find any invalid entries or artifacts that may be affecting these two annoying effects, but I cannot find anything yet.
     Any ideas?  I need to know what policies will disable the remoteregistry service OR the IPTunelling service, or where in the registry this could be set to enact this during a policy refresh.  Of course, any other ideas are welcome, I have spent
    several days troubleshooting this, and need to conquer this by tomorrow if possible, thank you. James

    Hi,
    Please type
    services.msc in RUN to open Services panel, navigate to the Remote Registry service. Then open its Properties and set
    Startup type: Automatic. Then please check if this issue still exist.
    In addition, please refer to mlippold’s suggestion (the last reply) in following thread and configure relevant
    value in RemoteRegistry registry key, then check if can help you to solve this issue.
    For registry items, please back up all registry items before all operations. That will help us to avoid some unexpected issue.
    Remote
    Registry Service stops automatically if we do not use it above 10 minutes
    By the way, did you open Event Viewer and check if find any relevant errors?
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Disable/Hide Clipboard Sharing in remote control viewer

    I need to give access to Help Desk Users so that they can take remote Control of the local machine but
    they can not copy paste files. I want 'Enable Clipboard Sharing' disabled. Is this possible?
    1. I tried thru registry entry in every helpdesk machine to change clipboard value to 0/1, Where users
    are allowed to modify to modify registry in HKLU entries  so unable to block.
    2. I am planning to control the clipboard settings in server level.
    So other than SCCM administrator, no one allowed to modify.
    Pls suggest

    This should do the trick:
    http://social.technet.microsoft.com/Forums/en-US/cbc8cd28-4314-4988-8d32-6fba7b57fdad/remote-control-with-disable-clipboard-sharing?forum=configmanagergeneral
    It's a user setting and not configurable through ConfigMgr. I would think you can use a GPO to set that key.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Oracle registry entries lost.

    Relative novice DBA here....
    We were having a problem with a drive controller on one of our development database servers and the system admin had to re-install the operating system (Windows2000) and that efficiently wiped out all the Oracle registry entries. The database files are all still out there and Oracle is still installed, but of course since the registry entries aren't there it won't start up.
    Is there any way to recreate those entries, or can I re-install Oracle, create databases and point them to the existing files. Will it be able to recognize that the files have data and be able to read them?
    There were no backups because it was a development box and the data could just be reloaded (a long process I'm trying to avoid).
    I can re-install Oracle entirely, recreate the databases from the DDL and reload the data, but I'm just trying to make sure there is not an easier way.
    Is it "start from scratch" time?
    I think this would be a good thing for folks to know.
    Any help anyone can provide would be greatly appreciated. Thanks.
    - Dave Matern

    If you only re-installed the Oracle software and didn't touch any of the database files, it should have worked. I just did the same a few days ago on my laptop when Oracle installer (again) messed up when trying to de-install an obsolete oracle_home.
    Maybe because you had a problem with the controller, the control file and data files went out of synch in some way. Now, I am not a DBA, so this is getting a bit tricky for me too. You may try to recreate the control file. Backup everything before you do this!
    SVRMGR
    CONNECT INTERNAL
    STARTUP MOUNT PFILE=<fullpath>
    ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS; This will create a trace file in the trace file directory. The file will have the extension ".trc" and is located either in the directory defined by the initialization parameter 'user_dump_dest', or, if this is not defined in "ORACLE_HOME/rdbms/log," the file should be copied to a name such as "ccf<SID>.sql.
    Check this script to see if all the paths and files are correct. Then:
    SVRMGR
    CONNECT INTERNAL
    STARTUP NOMOUNT PFILE=<fullpath>
    @ccf<SID>.sql
    ALTER DATABASE OPEN RESETLOGS;

  • Registry entrie for installed updates

    How to check whether an update is installed from registry in Windows Server 2012 R2? My requirement is - I want to install an update based on whether another dependent update is installed e.g. to install the latest update for 2012 R2 we need the KB2919442
    to be installed. I would like to know which registry entries correspond to an update and based on that install the dependent updates using a script.

    Hi ChristopherJC,
    If you can run powershell script to check the installed updates on the server, please check this script, which get the software updates, however, it isn't based on the registry:
    $UpdateSession = New-Object -ComObject Microsoft.Update.Session
    $SearchResult = $null
    $UpdateSearcher = $UpdateSession.CreateUpdateSearcher()
    $UpdateSearcher.Online = $true
    $SearchResult = $UpdateSearcher.Search("IsInstalled=1 and Type='Software'")
    $i = 1
    foreach($Update in $SearchResult.Updates)
    Write-Host "$i) $($Update.Title + " | " + $Update.SecurityBulletinIDs)"
    $i += 1
    Reference from:
    Listing all the patches/updates installed in Windows
    machine
    I hope this helps.

Maybe you are looking for