![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Connecting to Win32_DFSTarget on Windows Server 2008 I am using the following script for listing DFS on a server: strComputer = "SERVERNAME1" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colDfsNodes = objWMIService.ExecQuery _ ("Select * from Win32_DFSNode") For each objDfsNode in colDfsNodes Wscript.Echo "Caption: " & objDfsNode.Caption Wscript.Echo "Description: " & objDfsNode.Description Wscript.Echo "Install Date: " & objDfsNode.InstallDate Wscript.Echo "Name: " & objDfsNode.Name Wscript.Echo "Root: " & objDfsNode.Root Wscript.Echo "State: " & objDfsNode.State Wscript.Echo "Status: " & objDfsNode.Status Wscript.Echo "Timeout: " & objDfsNode.Timeout Next (from http://www.activexperts.com/activmon...ts/storage/dfs ) This script does not work when connecting to a Windows Server 2008, however it works fine on Windows 2003 Server. So. Any clues? -- -- HAL07, Engineering Services, Norway |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Connecting to Win32_DFSTarget on Windows Server 2008 "HAL07" <yahoohal@xxxxxx> wrote in message news:eop0X95fJHA.1292@xxxxxx Quote: >I am using the following script for listing DFS on a server: > > strComputer = "SERVERNAME1" > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > > Set colDfsNodes = objWMIService.ExecQuery _ > ("Select * from Win32_DFSNode") > > For each objDfsNode in colDfsNodes > Wscript.Echo "Caption: " & objDfsNode.Caption > Wscript.Echo "Description: " & objDfsNode.Description > Wscript.Echo "Install Date: " & objDfsNode.InstallDate > Wscript.Echo "Name: " & objDfsNode.Name > Wscript.Echo "Root: " & objDfsNode.Root > Wscript.Echo "State: " & objDfsNode.State > Wscript.Echo "Status: " & objDfsNode.Status > Wscript.Echo "Timeout: " & objDfsNode.Timeout > Next > > (from > http://www.activexperts.com/activmon...ts/storage/dfs ) > > This script does not work when connecting to a Windows Server 2008, > however it works fine on Windows 2003 Server. > > So. Any clues? Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ & strComputer & "\root\cimv2") If the script works on the server, but not remotely, then perhaps DCOM is disabled. You may need to use: netsh firewall set service remoteadmin enable -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Connecting to Win32_DFSTarget on Windows Server 2008 > Does it help to use authenticationLevel: Quote: > > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ > & strComputer & "\root\cimv2") > > If the script works on the server, but not remotely, then perhaps DCOM is > disabled. You may need to use: > > netsh firewall set service remoteadmin enable But no result... Any clues? |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Connecting to Win32_DFSTarget on Windows Server 2008 "HAL07" <yahoohal@xxxxxx> wrote in message news:uv$DxEFgJHA.3904@xxxxxx Quote: Quote: >> Does it help to use authenticationLevel: >> >> Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ >> & strComputer & "\root\cimv2") >> >> If the script works on the server, but not remotely, then perhaps DCOM is >> disabled. You may need to use: >> >> netsh firewall set service remoteadmin enable > I tried both your script modification and the netsh. I even tried turning > off the firewall and rebooted. > But no result... > > Any clues? to become corrupt. I have used the following links to troubleshoot WMI: http://www.microsoft.com/technet/scr.../help/wmi.mspx http://support.microsoft.com/kb/875605 http://www.microsoft.com/technet/scr...es/wmifaq.mspx -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Connecting to Win32_DFSTarget on Windows Server 2008 > Quote: > I know of no reason why it should not work on W2k8. It is possible for WMI > to become corrupt. I have used the following links to troubleshoot WMI: > > http://www.microsoft.com/technet/scr.../help/wmi.mspx > > http://support.microsoft.com/kb/875605 > > http://www.microsoft.com/technet/scr...es/wmifaq.mspx > Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_Service Where Name = 'DFSR' and State = 'Running'") it connects and I have output. So I wonder if the names of DFSR have somewhat changed the syntax in 2008? -- -- HAL07, Engineering Services, Norway |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Error when installing SQL Express 2008 on Windows Server 2008 | PowerShell | |||
| Windows Server 2008 hosted on Virtual Server 2005 R2 very slow | Virtual Server | |||
| Cna't Install Windows Server 2008 under Virtual Server SP1 | Virtual Server | |||
| Error installing Windows Server 2008 as Virtual Server | Virtual Server | |||
| Bug: Windows Modules Service Is Broken In Windows Server 2008 Beta 3 Web Server Addition. | Vista General | |||