|
| ||||||||||
| Tags: script, vbs, windows server 2008 |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| VBS Script in Server 2008R2
ADDS, DHCP, DNS, FS, NP&AS, Print&Doc, IIS, WDS, WSUS. The domain forest level is 2008R2 The following is the ipconfig /all from the server: Code: Windows IP Configuration
Host Name . . . . . . . . . . . . : server1
Primary Dns Suffix . . . . . . . : ntechdc.ntechshop.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ntechdc.ntechshop.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controlle
r
Physical Address. . . . . . . . . : 00-1A-A0-A7-F8-AD
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::4dfa:697f:d64a:176a%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.10(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 234887840
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-24-E0-44-00-1A-A0-A7-F8-AD
DNS Servers . . . . . . . . . . . : ::1
127.0.0.1
192.168.1.10
209.18.47.61
209.18.47.62
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{8DBAF0F0-FFCF-44A6-8294-F8944AE9E399}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 11:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes Code: ON ERROR RESUME NEXT
Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
'Automatically grab the user's domain name
DomainString = Wshnetwork.UserDomain
'Find the Windows Directory
WinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
'Grab the user name
UserString = WSHNetwork.UserName
'Bind to the user object to get user name and check for group memberships later
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
'Grab the computer name for use in add-on code later
strComputer = WSHNetwork.ComputerName
'Now check for group memberships and map appropriate drives
'Note that this checks Global Groups and not domain local groups.
For Each GroupObj In UserObj.Groups
'Force upper case comparison of the group names, otherwise this is case sensitive.
Select Case UCase(GroupObj.Name)
Case "NTECHSHOP"
'Map network locations of drives
WSHNetwork.MapNetworkDrive "P:", "\\SERVER1\NetworkShare\BACKUP PUBLIC",True
WSHNetwork.MapNetworkDrive "M:", "\\SERVER1\NetworkShare\MICROSOFT IMAGES",True
WSHNetwork.MapNetworkDrive "T:", "\\SERVER1\NetworkShare\REPAIR TOOLS",True
WSHNetwork.MapNetworkDrive "N:", "\\SERVER1\NetworkShare\NTECH",True
WSHNetwork.MapNetworkDrive "Z:", "\\SERVER1\NetworkShare\NTECH BACKUP",True
'Map locations of network printers
WSHNetwork.SetDefaultPrinter "\\NTECHDC\NTech WiFi Lexmark"
End Select
Next
'Quit the script
wscript.quit When I logon to a workstation which is Windows 7 Ultimate joined to the domain the logon script does not run. Here is the ipconfig /all from the workstation: Code: Windows IP Configuration
Host Name . . . . . . . . . . . . : NTech2-PC
Primary Dns Suffix . . . . . . . : ntechdc.ntechshop.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ntechdc.ntechshop.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : ntechdc.ntechshop.com
Description . . . . . . . . . . . : Realtek RTL8168D/8111D Family PCI-E Gigab
it Ethernet NIC (NDIS 6.20)
Physical Address. . . . . . . . . : 8C-89-A5-18-CA-42
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.101(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Wednesday, October 19, 2011 10:16:21 AM
Lease Expires . . . . . . . . . . : Thursday, October 27, 2011 10:16:24 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.10
DNS Servers . . . . . . . . . . . : 192.168.1.10
209.18.47.61
209.18.47.62
Primary WINS Server . . . . . . . : 192.168.1.10
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.ntechdc.ntechshop.com:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : ntechdc.ntechshop.com
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes When I logon to a XP machine I get the following error thrown at me when running a gpresult: Code: Error: Invalid Namespace. Code: RSOP data for NTECHDC\chrisn on NTECH2-PC : Logging Mode
---------------------------------------------------------
OS Configuration: Member Workstation
OS Version: 6.1.7601
Site Name: Default-First-Site-Name
Roaming Profile: N/A
Local Profile: C:\Users\chrisn
Connected over a slow link?: No
COMPUTER SETTINGS
------------------
CN=NTECH2-PC,OU=Workstations,OU=NTech,DC=ntechdc,DC=ntechshop,DC=com
Last time Group Policy was applied: 10/20/2011 at 11:38:51 AM
Group Policy was applied from: server1.ntechdc.ntechshop.com
Group Policy slow link threshold: 500 kbps
Domain Name: NTECHDC
Domain Type: Windows 2000
Applied Group Policy Objects
-----------------------------
Default Domain Policy
The following GPOs were not applied because they were filtered out
-------------------------------------------------------------------
NTechShop
Filtering: Not Applied (Empty)
Local Group Policy
Filtering: Not Applied (Empty)
The computer is a part of the following security groups
-------------------------------------------------------
BUILTIN\Administrators
Everyone
BUILTIN\Users
NT AUTHORITY\NETWORK
NT AUTHORITY\Authenticated Users
This Organization
NTECH2-PC$
Domain Computers
System Mandatory Level
USER SETTINGS
--------------
CN=Chris Newman,OU=Users,OU=NTech,DC=ntechdc,DC=ntechshop,DC=com
Last time Group Policy was applied: 10/20/2011 at 12:24:15 PM
Group Policy was applied from: server1.ntechdc.ntechshop.com
Group Policy slow link threshold: 500 kbps
Domain Name: NTECHDC
Domain Type: Windows 2000
Applied Group Policy Objects
-----------------------------
NTechShop
Default Domain Policy
The following GPOs were not applied because they were filtered out
-------------------------------------------------------------------
Local Group Policy
Filtering: Not Applied (Empty)
The user is a part of the following security groups
---------------------------------------------------
Domain Users
Everyone
BUILTIN\Users
BUILTIN\Administrators
NT AUTHORITY\INTERACTIVE
CONSOLE LOGON
NT AUTHORITY\Authenticated Users
This Organization
LOCAL
Domain Admins
Group Policy Creator Owners
NTechShop
Enterprise Admins
Schema Admins
Denied RODC Password Replication Group
Scan Operators
High Mandatory Level I have experience setting up networks, but have never done one alone, and I'm really just trying to create this for a practice environment. Thanks in advance. |
|
#2
| ||||
| ||||
| Re: VBS Script in Server 2008R2
You can try the below suggestions and try if it fixex the issue:
__________________ Education, Career and Job Discussions |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "VBS Script in Server 2008R2" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The DNS server was unable to open Active Directory windows 2008r2 | petergriffin | Operating Systems | 1 | 22-07-2011 03:22 AM |
| Trying to add Server 2008R2 to a 2003 domain | JohnFli | Windows Server Help | 4 | 09-07-2011 12:22 AM |
| sbs 2003 to 2008r2 | expmicro | Windows Server Help | 1 | 01-05-2011 07:42 AM |
| Migrating from Server 2003 R2 to Server 2008 R2, issues with logon script and network when old DC is powered down | OctAvio2011 | Operating Systems | 5 | 20-08-2010 11:07 PM |
| Need Script for MS SQL Server | Saura | Software Development | 4 | 06-03-2010 12:46 AM |