Printers deployed by Group Policy Preferences disappeared during GP refresh processing

I am testing deployment of print queues using GP preference. All clients are Win 7. Replace mode is used so that the print queues can be updated if they are renamed on server side. Also set to remove the printers when GP is out of scope. I found that all
the printers disappeared during GP refresh processing which happens every 90 to 120 mins by default. Then repopulated. As most of them are utilizing HP universal print driver so the repopulation usually take 5 to 10 minutes to complete.
To stop the refresh I attempt to set maxnogpolistchangesinterval registry value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\{BC75B1ED-5833-4858-9BB8-CBF0B166DF9D} to 960 (16 hours). As users shutdown computer
daily so this should eliminate the refresh processing on printers. But the reg key can be writted only by SYSTEM. Administrators have read access only. Looks like anything under the key should not be modified.
Is there something I can set so that printer processing happens only during computer startup?

HelloForest,
To achieve the requirement, you can try the following solutions:
1.     Create
a startup script to deploy the registry value;
How Can I Use the RunAs Command to Run a Script Under Alternate User Credentials?
http://blogs.technet.com/b/heyscriptingguy/archive/2006/04/28/how-can-i-use-the-runas-command-to-run-a-script-under-alternate-user-credentials.aspx
2.     Create
a custom .adm to deploy the registry value;
Writing Custom ADM Files for System Policy Editor
http://support.microsoft.com/kb/225087
Brent Hu,
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer
your question. This can be beneficial to other community members reading the thread. ”

Similar Messages

  • Does using Group Policy Preferences to deploy printers require the print driver to be pre-installed?

    I'm trying to prepare our school system for Windows 7 (we currently use XP).  I would like to use the new Group Policy Preferences method of deploying printers.  I pushed out the XP client side extensions through WSUS.  In my test environment, I added the shared printer in group policy preferences.  My XP machine had the printers show up automatically, but my Windows 7 machine did not.  I realized that I had previously connected a printer of the same type to my XP machine before and the drivers were already installed.  To test this theory, I manually connected the shared printers to the Windows 7 machine, deleted them, then logged off and back on.  Now the printers are showing up from group policy.  My question is does using group policy preferences to deploy printers require the print driver to be pre-installed?  If not, then what am I doing wrong?  If so, is there a way to work around this?  Thanks for your help.
    EDIT:  To clarify, I am using the share method in GPP.  This is the error message I get in the event log:
    The user 'PRINTERNAME' preference item in the 'win7 printer test {946461A1-27F8-406F-A0B3-0A1A05AF34F6}' Group Policy object did not apply because it failed with error code '0x80070bcb The specified printer driver was not found on the system and needs to be downloaded.' This error was suppressed.

    This link have a description of resolution:
    http://technet.microsoft.com/en-us/library/cc725938.aspx
    Open the GPMC.
    Open the GPO where the printer connections are deployed, and navigate to Computer Configuration, Policies, Administrative Templates, Control
    Panel, and thenPrinters.
    Note
    The Point and Print Restrictions setting can also be found under User Configuration\Policies\Administrative Templates\Control Panel\Printers.
    This policy is ignored by Windows 7 and Windows Server 2008 R2, but is enforced by earlier editions of Windows including Windows XP with SP1, Windows Server 2003 with SP1, and Windows Server 2008. We recommend that you change
    this policy setting in both locations so that all down-level clients have a consistent experience.
    Right-click Point and Print Restrictions, and then click Properties.
    Click Enabled.
    Clear the following check boxes:
    Users can only point and print to these servers 
    Users can only point and print to machines in their forest 
    In the When installing drivers for a new connection box, select Do not show warning or elevation prompt.
    Scroll down, and in the When updating drivers for an existing connection box, select Show warning only.
    Click OK.

  • Extreme slow login on Server 2008 R2 TS at Group Policy Preferences - Printers

    I see references to this problem everywhere, going back to 2010.  However I'm not finding any real answers.
    I have Group Policy Preferences installing printers to Terminal Server Users.  I have one policy that applies to 4 terminal servers.  One of them is a 2008 R2, the others are 2003 x64.  Only for the 2008 R2 server, after all of the printers
    show (in event viewer) as successfully loaded, there is a long hang.  I have many printers applied to me, and that results in my load time being the longest of all at about 3 minutes.  I am an administrator on the machine.  Others have the exact
    same problem, just a bit less pronounced depending on the number of printers. 
    The policy preference is set to UPDATE, so it's not loading the driver... again, the printer is already successfully applied.
    I've tried setting UAC to "Never" on the server.  No effect.  I've played with the Point and Print policy at both computer and user level, finally just setting both to disabled, but prior to that setting them to Enabled with the "do
    not show warning" on both settings.  No effect (which makes sense since that is for non-admins and I am having this problem as an admin).
    My logging pasted below shows this same thing in all cases.
    Is there an answer to this that I am just not finding?
    2013-12-06 09:11:44.133 [pid=0x388,tid=0xca0] Filters passed.
    2013-12-06 09:11:44.133 [pid=0x388,tid=0xca0] Adding child elements to RSOP.
    2013-12-06 09:11:44.133 [pid=0x388,tid=0xca0] Set user security context.
    2013-12-06 09:11:44.289 [pid=0x388,tid=0xca0] Set system security context.
    2013-12-06 09:14:13.873 [pid=0x388,tid=0xca0] Set user security context.
    2013-12-06 09:14:13.909 [pid=0x388,tid=0xca0] Set system security context.
    2013-12-06 09:14:13.909 [pid=0x388,tid=0xca0] Properties handled.
    2013-12-06 09:14:13.909 [pid=0x388,tid=0xca0] RunOnce value created [SUCCEEDED(S_FALSE)]

    Hi,
    Based on your description, I want to confirm whether we have used Item-level Targeting of GPP for printer deploying.
    GP Preferences settings that use Item- Level Targeting (ILT) are not inherently harmful. However, certain kinds of Item Level Targeting queries can
    take more time to run.
    Regarding this issue, the following article can be referred to for more information and the hotfix in the article can be downloaded to fix the issue.
    You experience a long domain logon time in Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2 after you deploy Group Policy preferences
    to the computer
    http://support.microsoft.com/kb/2561285/en-us
    In addition, regarding group policy and logon impact, the following article can be referred to for more information.
    Group Policy and Logon Impact
    http://blogs.technet.com/b/grouppolicy/archive/2013/05/23/group-policy-and-logon-impact.aspx
    Best regards,
    Frank Shen

  • Group policy preference for creating printers setting the wrong printer as default

    Hi
    We have a a group policy preference applied to users.  At the moment we create a shared printer and set it as default for all users in a specific OU.  Now we need to add another shared printer.  I have updated the policy and set it to create
    the new shared printer and have set item level targeting to the same OU as the first printer.  I want to keep the existing printer as the default, however when the policy runs, the new printer is created fine but it is set as the default
    printer.  Is this because it has been added last ?  There doesn't seem to be a way of changing the order that the printers are applied.
    Both printers are Shared printers and are set to Create
    The existing printer (printer A) is set as the default printer.  It is targeted at the London OU.
    The new printer (printer B) has NOT been set as default.  It is targeted at the London OU.
    No other options have been set.
    When the policy is applied both printers are added but printer B is being set as the default.
    Any help would be appreciated.
    Thanks
    G

    Hi G,
    >>however when the policy runs, the new printer is created fine but it is set as the default printer.  Is this because it has been added last ?  There doesn't seem to be a way of changing the order that the printers are applied.
    Before going further, what's the operating systems of our clients? Here, I need to double confirm that the checkbox of
    Set this printer as the default printer... is not selected in the new GPP Printer item. Besides, we can change the orders of the printer items. To do this, select the printer item, right click, click All Tasks, and choose Move Up or Move
    Down to change the order.
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Vista logon stuck with Group Policy Preferences

    After testing some Group Policy Preferences, my Vista SP1 laptop was stuck logging on , it showed (welcome) and then stopped the logon process.
    To be sure i did a fresh Vista reinstall but i still couldn't logon to the domain, the GPO Event log showed that it was looping (endless) trough the GPO's, without showing any obvious errors. I removed all the settings from the Preferences GPO, i stayed with GPOP Drive and Printers mappings and they work fine.  
    After adding these 3 settings it hung again:
    Regional Settings
    Abort rest of group on error:  No
    Process in user context:  Yes
    Remove (if not applied):  No
    Preference (apply once):  No
    Filtered directly:  No
    Filtered by ancestor:  No
    Disabled directly:  No
    Disabled by ancestor:  No
    Internet Settings
    Abort rest of group on error:  No
    Process in user context:  No
    Remove (if not applied):  No
    Preference (apply once):  No
    Filtered directly:  No
    Filtered by ancestor:  No
    Disabled directly:  No
    Disabled by ancestor:  NO
    Start Menu
    Abort rest of group on error:  No
    Process in user context:  Yes
    Remove (if not applied):  No
    Preference (apply once):  No
    Filtered directly:  No
    Filtered by ancestor:  No
    Disabled directly:  No
    Disabled by ancestor:  No
    Is this normal behavior, and has someone else seen this unwanted "feature"!?? Or did i make a mistake..

    Hi tnx for your reply
     Florian Frommherz wrote:
    So did it actually stop? The blue circle did it stop turning around? How long did you wait for it to complete? Are there only Preferences or policies in place as well?
    The blue circle is turning arround, it seems looping, after 20 seconds it stops for half a second and starts a new 20 second loop stops for half a second etc etc. In the GPO Vista event log i can find this loop. (checking link speed, finding applying GPO's....... and starting over again)
    I waited for more then an hour, a normal logon takes 30 seconds for the Welcome screen.
     Florian Frommherz wrote:
    So - you mean to say that it behaves the same way? It just stops processing the policies?
    It doesn't stop, it seems to loop...
     Florian Frommherz wrote:
    I guess not. Could you create a new, seperate policy will all the Preference settings that let the machine "get stuck" and apply it to a test machine so that those Preferences in question are the only ones applied? Maybe you can track down which Preference causes the machine to choke.
    I did, i seperated the GPO Parts, i know that the Drive and Printer mappings from the GPOP are working fine.
    It's in one of those 3 GPO settings (IE, regional, start menu). Even if i disable those specific GPOP parts the logon still gets stuck, after removing / disabling the complete GPO logon runs normal.
    I also think during logoff the GPOP are also conflicting since it's also stuck during logoff.
    Other Domain accounts are able to logon and off fine!
    Could this be caused by the, running a GPOP in User context???
    My Vista version is Enterprise, i didn't check on other Vista versions.

  • Group policy Preferences server 2008 and windows 7

    Hi I have been struggling with an issue with group policy preferences for a while now with regard to pushing out printers to windows 7 (32/64 bit) Machines. I have two DC servers one is 2008 and the other is 2008 r2. I have setup the group policies on the
    2008 server as it is the only one i am allowed to access regularly to do this.
    Basically here is my problem. I have created multiple GPO's to send out printers from out print server to classrooms across the school district I work for, I have a mix of xp and windows 7 machines. I have the server setup with both 32 and 64bit drivers
    for all printers on that server, we have a mix of oki and hp and ricoh. I know all the connections work and the drivers work well, however when I push them out using the group policy, the windows 7 machines don't install the printers. The xp machines do this
    perfectly well when I install the client side extensions patch, but they just will not pull down on the 7 machines unless i install the printer first manually, then delete it and then run gpupdate. In that instance it will work, but obviously i don't want
    to have to go round thousands of computers doing this manually.
    Just as a side note, each classroom has its own user account and its own printer.
    If anyone has any advice as to how i can go about resolving this issue i would greatly appreciate it, this has been a problem i have been researching and trying to fix since January.......

    Hi,
    >>The xp machines do this perfectly well when I install the client side extensions patch, but they just will not pull down on the 7 machines unless i install the
    printer first manually, then delete it and then run gpupdate.
    Before going further, we can run command
    gpresult/h gpreport.html with admin privileges to collect group policy result on the troubled Windows 7 clients to check the issue. Besides, we can also check event logs in Event Viewer to see if some related error events were logged.
    Besides, I want to confirm if we have disabled
    Point and Print Restrictions under both User Configuration and Computer Configuration. To have a consistent experience, it’s recommended that we disable the policy setting in both locations if we are dealing with mixed-level clients.
    Regarding this point, the following article can be referred to for more information.
    Point and Print Restrictions policies are ignored in Windows Vista SP2, Windows Server 2008 SP2, and later Windows operating systems
    http://support.microsoft.com/kb/2307161/en-us
    Best regards,
    Frank Shen

  • [Forum FAQ] Group Policy Preferences Scheduled Tasks Item not working when the option Run whether user is logged on or not is selected

    Scenario:
    We use one of the following Group Policy Preferences Scheduled Tasks item to deploy a task to clients:
    Computer Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Scheduled Task (At least Windows 7)
    Computer Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Immediate Task (At least Windows 7)
    User Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Scheduled Task (At least Windows 7)
    User Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Immediate Task (At least Windows 7)
    (Note that on some platforms, "At least Windows 7" is replaced with "Windows Vista and later.")
    After designating a user account to run the task, we select “Run whether user is logged on or not” option, and “The Do not store password…”
    check box is automatically grayed out (See Figure 1).
    Figure 1
    After finishing configuring the task item, on a client, we run command
    gpupdate/force to forcefully update group policy. However, on the client, when we check if the task is listed in Task Scheduler snap-in, the task is not displayed, and when we run
    gpresult/h report.html to collect group policy result for troubleshooting, we see an error as similar as shown in the following figure (Figure 2).
    Figure 2
    Cause:
    To make the scheduled task run whether the user is logged on or not, we need to store the password of the designated user account. However, for the content of the scheduled
    task item is stored in Sysvol where it’s not safe to store passwords, this function has been deprecated.
    Workaround:
    We can run the task with system account
    NT Authority\System, or we can use specific user accounts to run the task when the given user is logged on. (See Figure 3)
    Figure 3
    Reference:
    MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege: May 13, 2014
    http://support.microsoft.com/kb/2962486
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hello Everyone,
    Succeeded !!!!!!!
    Even i was struggling with this same Problem to execute a batch via Window scheduler and set the setting to "Run whether the user is logged in or not".
    I tried many time but the batch runs with " Run
    whether user is logged on" and not with "Run
    whether user is logged on or not".
    what i discovered is that there was one mapped drive
    path in my batch file which was not the complete path like y:/AR.qvw actually what i did i changed that map path to the complete path like \\servnamename\d$\AR.qvw and the batch executed successfully with the setting "Run
    whether user is logged on or not"
    The
    conclusion is that check the dependency of the script on external resources because when you check this option "Run
    whether user is logged on or not" It actually conflicts. This my discovery.
    If
    you have any question write me on [email protected]
    Thanks
    & Regards,
    Arun

  • Group policy preferences CSE

    Hi,
    I'm in a mixed server infra (2008 and 2003) and would like to deploy GPE for rebooting, I've tried to approve KB9433729 but wsus will not approve as its expired, what is the quickest way to get this update out to the 2003 servers. 

    Hi Ror73,
    After my testing, please download this KB from the followng link and manually install it:
    Group Policy Preference Client Side Extensions for Windows Server 2003 (KB943729)
    Group Policy Preference Client Side Extensions for Windows Server 2003 x64 Edition (KB943729)
    Regards,
    Lany Zhang

  • Mandatory Profiles, Group Policy Preferences, Synchronous processing

    Hello,
    I'm using Windows 8.1 Update to setup a lab of computers that will use standard user accounts with Mandatory Profiles and Group Policy to lock them down. Everything is working great with the exception of Group Policy Preferences. I am using GPP printers
    to add a shared printer to the computer lab and set the default. Due to asynchronous processing, the GPPs are applied only every other time. Since they are mandatory profiles, the settings are wiped out every time.
    I have enabled the GPO setting "Always wait for network at startup and logon" but it doesn't seem to have any effect. The Mandatory Profile is assigned in the user's AD object.
    From everything I can find on the issue, the problem seems to stem from the synchronous processing/asynchronous processing of group policy preferences, which explains the consistent alternating working. Fast logon optimization is always off when using a
    roaming user profile, which is the case of these standard users, to my understanding. I also configured cached logons to '0', disabling cached logons. The computers (configured to automatically sign in with SysInternals' Autologon) received an error (no logon
    servers available) trying to sign in before the network was ready, showing that they are ignoring the setting. Even with waiting for the network and signing in manually, the GPP printers are only successfully added every other time.
    http://technet.microsoft.com/en-us/library/jj573586.aspx
    2008R2 functional level
    I have created and recreated GPOs to test creating them on the DC and a Windows 8.1 Update computer, with no change in outcome.
    I have also tried setting Startup policy processing wait time, run logon scripts synchronously, and GPP Printers processing behaviors. For the latest testing, I created a new OU with blocked inheritance and created a new GPO with just the key settings to
    wait for network, install the printers, and use the mandatory profile. It still only worked every other time.
    I am currently at a loss for a good way to add the printers to the mandatory profiles. I have hacked them into the HKCU of the mandatory profile but I feel that is a kludge solution and not very sustainable. I have tried a logon PowerShell script but had
    no luck.
    TL;DR: Win8.1Update, Mandatory Profiles, standard user: Every other restart, GPP Printers are added perfectly and the desired outcome is reached. Every other, other restart the printers are not added.

    Hi,
    I'll involve other engineer to this thread for more discussion about your problem. Please wait patient.
    Thank you for your understanding!
    Roger Lu
    TechNet Community Support

  • Group Policy Preferences possible in ZCM11?

    Hi,
    i created a thread (http://forums.novell.com/novell/nove...esnt-work.html) because some GPOs are not working with ZCM11SP2. Now i figured out, that the Problem is the GPPs (Group Policy Preferences).
    THey are available since Windows Server 2008 or 2008R2, i'm not sure.
    With this GPPs you can map drives, set printers, change the registry, power management ...
    Is it possible to use this GPPs with ZCM Policies?
    Cheers

    Here is a bit of a primer:
    http://technet.microsoft.com/en-us/m...01.layout.aspx
    Note: You will need to use ADM and not ADMX if I recall.
    The key will be knowing what registry keys to set.
    For PowerSettings, there are some ADM files floating about the internet
    already.
    On 6/25/2012 12:46 PM, drops wrote:
    >
    > Hi Steffen,
    >
    > for folder redirection look here:
    > 'Cool Solutions: Local Group Policy Folder Redirection (HKCU User
    > Shell)' (http://www.novell.com/coolsolutions/tools/14324.html)
    >
    > it works with windows 7.
    >
    > For a lot of configuration settings i prefer bundles. e.g. registry
    > changes to HKLM.
    >
    > Power management: use powercfg.exe -IMPORT
    >
    > Printer: we use iprint policies. for local printers look at rundll32
    > PrintUI.dll, PrintUIEntry /?
    >
    >
    > With software simply use the Bundle - see your foxitreader example and
    > recommendation from Shaun.
    >
    > best regards
    >
    > Markus
    >
    >
    >
    > SteffenMuch;2203349 Wrote:
    >> Hi Craig,
    >> do you know a good "how to" for this? I didnt create a group policy
    >> template until now.
    >>
    >> Cheers,
    >> Steffen
    >>
    >>
    >> @Shaun:
    >> Thanks, i will look at this solution.
    >
    >
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.

  • Group Policy Preferences

    I'm interested in applying group policy preferences to our new Windows 7 machines, partly to simplify my image-building process, via Zen 10 (soon Zen 11). However, I understand that these are not available through the Local Group Policy editor- so my question is, does anybody know how we could produce a set of Group Policy preference settings to deploy via Zen, without the presence of Active Directory?

    Make sure this option is not set on the policy in the ZCC.
    "After enforcement, force a re-login on the managed device, if necessary"
    On 5/24/2011 9:36 AM, jfansell wrote:
    >
    > Thanks- I was hoping to be able to utilise something that already
    > existed rather than using custom adm files- but we are now looking into
    > doing it that way now. Incidentally we do have a purely for testing AD
    > environment in which I created a test policy containing preferences, and
    > imported this into ZCM 10, still no joy even though the policy
    > preferences files appeared at the workstation (under
    > c:\Windows\System32\grouppolicy\...) they just weren't effective.
    > Presumably this is somehow a limitation of our environment (the AD is
    > completely disconnected from the users and workstations). It would be
    > nice if somehow the preferences were replicated in ZCM in the future.
    >
    >
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.

  • Group Policy Preferences Printer Delete Behavior

    I just had a maddening time trying to get Group Policy Preferences to delete printers.  I'm sharing what I found out so that you might have a better experience.
    1. Even though the field is grayed out, if you have something in the "Local Name" field, the printer will only be deleted if the name matches what you have here.
    2. If the "Local Name" field is empty, one printer with a matching IP address will be deleted.  If there are multiple printers with the same IP address, the policy will delete them one by one each time a refresh occurs unless you've got the "Apply
    Once" option active.
    The client I tested with was Windows 7 with version 6.1.7601.22249 of group policy preferences installed.

    After more testing, it turns out that all of my observations were correct:
    1. Even though the field is grayed out, if you have something in the "Local Name" field, the printer will only be deleted if the name matches what you have here.
    2. If the "Local Name" field is empty, one printer with a matching IP address will be deleted.  If there are multiple printers with the same IP address, the policy will delete them one by one each time a refresh occurs unless you've got the "Apply Once"
    option active.
    3. If the "Local Name" field is empty, a warning '0x80070709 The printer name is invalid.' will be logged in the  Application log.  If a printer exists, it will still be deleted.  If the "Apply once and do not reapply" option is checked, the
    warning will still be logged every time group policy refreshes.  This warning can be prevented by configuring "Configure Printers preference logging and tracing" to only log errors, but then you potentially miss out on warnings about actual problems.

  • Group policy Preference - Internet Option setting not applying

    Hi,
    I’m not very sure if any of you have encounter this strange issue when
    configuring GPP -> Internet option setting for window 7 IE9 or IE11.
    The following
    are spec of OS and IE version used in my environment.
    Window Server
    2012 R2 (IE 10)
    Window 7 (IE9
    and IE11)
    Recently I
    have deployed proxy setting via GPP as I do not have IEM under my GPMC console.
    Once the setting is been configured and deployed, I have notice that the GPO do
    not apply after the user login. The following scenarios is what we observed.
    1) User boot up the machine, Login and proxy setting will not applied
    1a) gpupdate /force -> Proxy Settings applied
    1b) setting will be removed after the GPO refreshed
    2) User boot up the machine, Login and proxy setting will not apply
    2a) User logoff and login proxy setting applied.
    2b) Setting will be removed after the GPO refreshed
    Kindy advise
    if there is any solution to ensure that the setting apply whenever the user
    login and stay intact even after the gpo refreshed by itself.

    Hi,
    >>1a) gpupdate /force -> Proxy Settings applied
    >>1b) setting will be removed after the GPO refreshed
    Based on the description, we can run command gpresult/h report.html to collect group policy result reports to compare how the settings are being applied.
    Besides, have we installed the following hotfix on the computers with IE 9? If not, we can try to install the hotfix.
    Internet Explorer Group Policy Preferences do not apply to Internet Explorer 9 in a Windows Server 2008 R2 domain environment
    https://support.microsoft.com/en-us/kb/2530309?wa=wsignin1.0
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I setup a scheduled task to run a Powershell Script delivered as a Group Policy Preference

    I have a Powershell script I want to run only once when a user logs onto their system. This script would move all the PST files from the Local drive and the Home drive to a folder location within the users profile. I wanted to run this as a Windows 7 Scheduled Task using Group Policy Preferences. How can I get this to happen short of a logon script? I have updated all the machines to WMF 4.0 so could I use a Scheduled Job instead? I wanted to run the script as the logon user but elevated.#Start Outlook and Disconnect attached PST files.
    $Outlook = New-Object -ComObject Outlook.Application
    $namespace = $outlook.getnamespace("MAPI")
    $folder = $namespace.GetDefaultFolder("olFolderInbox")
    $explorer = $folder.GetExplorer()
    $explorer.Display()
    $myArray= @()
    $outlook.Session.Stores | where{ ($_.FilePath -like'*.PST') } | foreach{[array]$myArray+= $_.FilePath}
    for
    ($x=0;$x-le$myArray.length-1;$x++)
    $PSTPath= $myArray[$x]
    $PST= $namespace.Stores | ?{$_.FilePath -like$PSTPath}
    $PSTRoot= $PST.GetRootFolder() #Get Root Folder name of PST
    $PSTFolder= $Namespace.Folders.Item($PSTRoot.Name) #Bind to PST for disconnection
    $Namespace.GetType().InvokeMember('RemoveStore',[System.Reflection.BindingFlags]::InvokeMethod,$null,$Namespace,($PSTFolder)) #Disconnect .PST
    #Move All PST files to the default location while deleting the PST files from their original location.
    $SourceList = ("$env:SystemDrive", "$env:HOMEDRIVE")
    $Destination = ("$env:USERPROFILE\MyOutlookFiles")
    (Get-ChildItem -Path $SourceList -Recurse -Filter *.PST) | Move-Item -Destination $Destination
    #Attach all PST files from the default location.
    Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
    $outlook = new-object -comobject outlook.application
    $namespace = $outlook.GetNameSpace("MAPI")
    dir “$env:USERPROFILE\MyOutlookFiles\*.pst” | % { $namespace.AddStore($_.FullName) }

    Mike,
    I do not understand what appears to be a regular expression above. I did add the PowerShell script to the HKCU RunOnce Key as suggested.
    Windows Registry Editor Version 5.00
    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -sta -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\scripts\Windows PowerShell\Move-PST.ps1"
     I'm delivering this using Group Policy Preferences. It seems to fail or time out when run because the behavior is different if I run the script from within the PowerShell IDE. I added the parameters to the script and will try it again in the morning.

  • Proxy details keep deleting from field in Group Policy Preferences for IE 10 on windows 7 and 8

    We have a lot of users who on the last update and have seemed to manage to install IE 10 onto their windows 7 machines as now causing all sorts of issues. I know that IEM has been replaced in favour of Group Policy Preferences and I have build a windows
    8 machine just to create a group policy preference as you are unable to create the preferences from windows 7, thank you Microsoft!
    I have created a test OU and got a win 7 and a win 8 machine both with IE 10 for testing. I have created the preference settings, home page etc and disabled using the F keys the advanced features that we do not require as from reading in other post even
    if it is not ticked, if it is green then it will apply it, kinda defeats the using the tick but it is what it is!
    When we do a gpupdate it picks up the default homepage as well as other settings but the proxy settings is blank. I then went back into the preferences I created for IE 10 and checked the connections, LAN settings and the proxy server name is missing but
    both ticks are showing for the proxy settings and when you click on advanced it shows the proxy server and port details fine. I have been working on this now for 4 days and getting no where to a point were we just roll back any users on IE 10 back to IE 9.
    I have also unlinked any other gpo relating to Internet settings on the test OU just in case there are conflicts. Any ideas as where to go from here?

    In the end to get around the proxy settings I had to create a registry key preference with proxy and port details which seemed to have done the trick and now IE 10 is picking up the proxy details and displaying webpages

Maybe you are looking for