Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert a script to Group Policy Preferences (server 2008)

Posted on 2008-10-03
4
Medium Priority
?
294 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 56

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 56

Accepted Solution

by:
McKnife earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

670 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