|
Guy recommends :
Find out which of your VMs are a waste of space and which VMs need more resources. |
Logon Scripts - With VBScriptIntroduction Logon ScriptsIn this section I will give you examples of how to build the VBScript to use in your logon script. I will help you chose which methods to use and which variables to change. There are two sections; one section specialises in mapped network drives, while the other section deals with scripts for printers. Please choose a Windows Logon Script to suit your particular task. Map Network Drive Logon Scripts
♦ Connect to Printers Logon Scripts
Introduction to Logon Scripts with VBScriptWhen I first saw Windows 2003, I investigated the new features. I wondered: 'How do I assign logon scripts to users?' I came up with two methods; the traditional NT 4.0 style or assigning VBScripts via Active Directory Group Policies. (The traditional method was via the User's Properties, Profile tab.) I even took a I step back and asked the more fundamental question: 'What am I trying to achieve here?' The answer was, 'To provide users with the best environment for their work'. This lead me to investigate VBScript methods for providing mapped network drives and connecting to shared printers. Good news. Scripting possibilities improve dramatically when you progress from the old DOS batch files, to the new WSH with its rich VBScript verbs. When you survey the big picture, you realize that Logon Scripts are only one of many jobs for WSH and VBScript. My point is that knowledge of these scripting objects, syntax and methods will help you automate other computer tasks. As a bonus, if you master assigning Logon Scripts by Group Policy, then you will see how to apply other settings using Group Policy (GPMC). Example of a Logon ScriptVBScript to map a network drive. Here are step-by-step instructions to create this logon script. ' MNDUserName.vbs Guy Recommends Solarwinds' Free Network Monitor![]() Thus utility makes it easy to check the health of your router or firewall. Check the real-time performance, and availability statistics, for any device on your network. Get started with an extensive collection of "out-of-the-box" monitors for popular network devices. Download your free Network Device Monitor More Tasks for VBScriptWSH provides the objects, which our scripts then manipulate. Here are examples of the tasks that these objects and services can do for you:
What is WSH? (Windows Scripting Host)Windows Scripting Host is aptly named; think of WSH as a butler who pampers their guests. When a logon script arrives from the dedicated server, WSH makes sure that all the objects and services that the script needs are available. It also checks discretely for security and passes the script to the appropriate script engine, for example, ActiveX. WSH is ideal for non-interactive scripting jobs, such as logon configuration, administrative scripting, or machine automation. Let me take you on a journey where you create mapped network drives or printers. Together we will study examples of VBScripts, object, method and properties model. Try PowerShell for Logon ScriptsYou may have noticed that VBScript is being phased out in favour of PowerShell. Although PowerShell is used primarily for interrogating the OS, it's possible to employ cmdlets to configure the users' environment. The best method is to create a ComObject, which acts as a wrapper for familiar VBScript commands. Here is example of PowerShell's New-Object cmdlet manipulating MapNetworkDrive: # PowerShell Logon 3 Script Example You could save the above commands into a .ps1 file. However, the tricky part is executing this .ps1 file as a logon script. I have more information here: PowerShell logon script and Group Policy.
Guy Recommends: Solarwinds' Free Bulk Import Tool
|
||||
Custom Search
|
Guy Recommends: WMI Monitor and It's Free!
|
|
Home Copyright © 1999-2012 Computer Performance LTD All rights reserved Please report a broken link, or an error. | |