Solved

Convert a script to Group Policy Preferences (server 2008)

Posted on 2008-10-03
4
291 Views
Last Modified: 2013-12-04
I would like to convert the following script into a group policy preferences.

Please could the forum offer some assistance


ifmember "ABC Users"
if errorlevel 1 goto ABCUser
:ABCUser
if exist \\%computername%\XYZ (net use g: \\%computername%\XYZ /persistent:no
 ) else (net use g: \\MY-SVR-212\ /persistent:no)
goto end

:end
h:

if not exist "ABC Docs" MD "ABC Docs"

thank you
0
Comment
Question by:titn003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:RobinHuman
ID: 22632750
Try copying the script into notepad and saving it as a .ADM file - not where you saved it;
Open group policy editor, select the policy you want to attach it to (not the default policy - if necessary, create a new blank policy), and in user administrative templates, right-click and import the file you saved as a .ADM
0
 
LVL 55

Expert Comment

by:McKnife
ID: 22640736
titn, the group targeting can be achieved by using the register "common" and checking item level targeting" and picking the security group "abcusers".
Mapping a drive is not really your problem, or is it? GPP calls it "drive maps" and it's below Preferences - windows settings. To achieve the if exist network drive thing, again use item level targeting ->registry item ->match value data->HKCU, keypath: network\g, value name:RemotePath, value type: reg_sz, value data \\server\share
0
 

Author Comment

by:titn003
ID: 22643779
MCknife

Mapping a drive is straight forward however the other stuff i have not done YET.


Do you know of any web links that that details examples of the above that I can follow
0
 
LVL 55

Accepted Solution

by:
McKnife earned 500 total points
ID: 22644184
Hi. I hoped my answer would be detailed enough to reproduce it :{, feel free to ask.
Did you look at the help? GPP has quite a good help. I don't have other links than the MS documentation:
--
- Group Policy Preferences Overview White Paper
http://www.microsoft.com/downloads/details.aspx?FamilyID=42e30e3f-6f01-4610-9d6e-f6e0fb7a0790&DisplayLang=en 
- Group Policy Preferences: Getting Started
http://technet.microsoft.com/en-us/library/cc731892.aspx 
- An extensive section on Preferences in the Group Policy Management Console (GPMC) Help for Windows Server 2008 (which is also available on TechNet)
http://technet.microsoft.com/en-us/library/cc771685.aspx   
-  Group Policy Preferences Frequently Asked Questions
http://technet.microsoft.com/en-us/windowsserver/grouppolicy/cc817590.aspx 
--
0

Featured Post

Ready to trade in that old firewall?

Whether you need to trade-up to a shiny new Firebox or just ready to upgrade from whatever appliance you're using now, WatchGuard has the right appliance for you! Find your perfect Firebox today with appliance sizing tool!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question