Solved

Convert a script to Group Policy Preferences (server 2008)

Posted on 2008-10-03
4
288 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
  • 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 54

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 54

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
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…

860 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