Jump to content

moinuddin_sh

Member
  • Posts

    25
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Saudi Arabia

Posts posted by moinuddin_sh

  1. I want to define password policy (lengh, age etc.) under the group policy of a user group. I did it "Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy\" but when a user of this group login to domain, this policy has no effect on the user.

  2. I have Windows 2003 server running with all the user name and policies in the AD. I installed Windows 2003 on another machine as a standby server (backup server for contingency). Every time I create a new user or edit some policy in my running server I have to repeate the same in the standby server.

    How can I copy the AD from my running server and restore on the standby machine?

    Thanks

  3. Create two files as explained below and copy these two files to the scripts folder under sysvol:

    create a file name "script.vbs" and copy the following in this file:

    On Error Resume Next

    Dim oNet, sUser, sDept

    Dim GroupList

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set WshShell = CreateObject("WScript.Shell")

    Set WshNetwork = WScript.CreateObject("WScript.Network")

    Set oNet = CreateObject("Wscript.Network")

    sUser =oNet.UserName

    rem UPDATE MCAFEE ANTIVIRUS WITH NEW VER

    Dim oShell

    Set oShell = WScript.CreateObject ("WSCript.shell")

    oShell.run "\\Server01\Mcafee\sdatnew.exe /s"

    Set oShell = Nothing

    oNet.MapNetworkDrive "K:", "\\Server01\" & sUser

    oNet.MapNetworkDrive "M:", "\\Server01\" & "Everyone"

    GetGroupInfo()

    LogonPath = fso.GetParentFolderName(WScript.ScriptFullName)

    '**************************************Group Mappings Based on Grouplist.csv*********************************

    If fso.FileExists(logonpath&"\Grouplist.csv") Then

    Set grplist = Fso.OpenTextFile(logonpath&"\Grouplist.csv")

    ' make File into an Array

    aGroup = Split(grplist.Readall,vbcrlf)

    For I = 0 to UBound(GroupList) ' Check Every Group Membership the user is in (populated into Grouplist)

    grpname = Grouplist(i)

    For x = 0 to UBound(aGroup) ' Read the entire CSV to make sure all drives are mapped for each Group

    mapline = agroup(x)

    If InStr(LCase(mapline),LCase(grpname)) Then ' If you're in the group

    mapline = Mid(mapline,InStr(mapline,",")+1) ' Remove the GroupName from the line

    Drive = Left(mapline,InStr(mapline,",")-1) ' Extract Drive Letter

    Path = Mid(mapline,InStr(mapline,",")+1) ' Extract the path

    If (fso.DriveExists(drive) <> True) and (Drive<>"!!") Then ' If The Drive is not already mapped

    WshNetwork.MapNetworkDrive drive,path ' Map The Drive

    wscript.sleep 1000

    End If

    If Drive = "!!" then

    WSHNetwork.AddWindowsPrinterConnection Path

    wscript.sleep 1000

    end if

    End If

    Next

    Next

    End If

    Sub GetGroupInfo

    Set UserObj = GetObject("WinNT://" & wshNetwork.UserDomain & "/" & WshNetwork.UserName)

    Set Groups = UserObj.groups

    For Each Group In Groups

    GroupCount = GroupCount + 1

    Next

    ReDim GroupList(GroupCount -1)

    i = 0

    For Each Group In Groups

    GroupList(i) = Group.Name

    i = i + 1

    Next

    End Sub

    Create another file name "Grouplist.csv"

    Finance,L:,\\Server01\Finance

    Engineering,L:,\\Server01\Engineering

    Technical Office,L:,\\Server01\Technical Office

    Front Office,L:,\\Server01\Front Office

  4. Dear Gosh,

    I read your post on msfn and on neowin regarding installing system restore on Windows 2003 server. As explained by you I copy the file "SR.IN_" to Windows 2003 server from an XP CD. Then I rename the file to "SR.INF", right click and install it gives an error message "Installation failed".

    Could you please guide how to install SR.INF on Windows 2003 server.

    Regards

  5. Here is the VB script that I added in my existing login script file. There is only one issue is there how can I run the update in Slient mode. When I add /Silent switch the did not work.

    Dim oShell

    Set oShell = WScript.CreateObject ("WSCript.shell")

    oShell.run "\\Server01\Mcafee\sdatnew.exe"

    Set oShell = Nothing

    If I use the silent switch as mentioned below then the script does not work.

    Dim oShell

    Set oShell = WScript.CreateObject ("WSCript.shell")

    oShell.run "\\Server01\Mcafee\sdatnew.exe /Silent"

    Set oShell = Nothing

  6. I have one Windows 2000 computer in my LAN which have restriction(s) that under "Computer Name" the button for "Network ID" is disabled and I am unable to change its workgroup.

    I have administration rights on this computer. How can I remove the restrictions and then joint this computer to my domain?

    I attached herewith the screen shots for review.

    Thanks

  7. I have a batch file created by me to update the new antivirus DAT files that I want to replace with one addition line in my following login script.

    ' VBScript.

    ' Mapping user home folder on the server

    Dim oNet, sUser, sDept

    Set oNet = CreateObject("Wscript.Network")

    sUser =oNet.UserName

    sDept =oNet.Dept

    oNet.MapNetworkDrive "P:", "\\Server01\" & sUser

    'Mapping Network Attached Drives

    'Dim WshNetwork

    'Set WshNetwork = WScript.CreateObject("WScript.Network")

    'WshNetwork.MapNetworkDrive "M:", "\\Server01\CMT"

    'WshNetwork.MapNetworkDrive "Q:", "\\Server01\Public Folder"

    'WshNetwork.MapNetworkDrive "S:", "\\Server01\Share"

    'WshNetwork.MapNetworkDrive "W:", "\\Server01\Course"

    'WshNetwork.MapNetworkDrive "Z:", "\\Server01\CopyScan"

    'Mapping Network Attached Printers

    Dim net

    Set net = CreateObject("WScript.Network")

    net.AddWindowsPrinterConnection Lpt1: \\Server01\HPLaserJetAccount

    'Selecting default printer

    Set net = CreateObject("WScript.Network")

    net.SetDefaultPrinter "\\Server01\HPLaserJetAccount"

  8. I need help creating a Login Script that will do the following:

    Map the share department drive

    I written the following login script to share the user drive:

    Dim oNet, sUser, sGroup

    Set oNet = CreateObject("Wscript.Network")

    sUser =oNet.UserName

    rem sGroup =oNet.GroupName

    oNet.MapNetworkDrive "K:", "\\Server1\" & sUser

    rem oNet.MapNetworkDrive "L:", "\\Server1\" & sGroup

  9. Under windows 2000 server when I open control panel all its items go to left hand side in vertical position. And then I am unable to open property page of any item until I re-start the server. This situation comes every after 3 to 4 days. I think some dll is accidently removed during a software uninstall.

    Any advise.

  10. I have Windows 2000 Server that receive an error message every after 20 second. This error message is available under System Event log file. The error message is:

    DCOM was unable to communciate with the computer "Server2" using any of the configured protocols.

    Can anyone advise the solution please

  11. Thanks for your usefull reply. Could you please expalin how can I capture a LPT1. I tried following command on the command prompt of a WS and it work fine but through VBscript it gives an error.

    Error Expected end of statement

    Error Code is 800A0401

    net use LPT1: \\Hetifhasvrfpr01\HPLaserJetAccount /persistent:yes

  12. I created a file "abc.bat" to be use as login scrip for network printer and map drive. I copied this file to "sysvol\sysvol\domain.com\script\abc.bat" and under user profile --> Login script typed abc.bat but it is not mapping the drive and not capturing the printer port.

    Login script

    net use I:\\computername\Account

    net us LPT1 \\computernam\10.10.30.26

    Can someone help me to find how can I

    Map a network drive

    Capture a network printer

    Thanks

×
×
  • Create New...