Win11 22H2 Broke PINTOHOME GPO Logon Script

John R 1 Reputation point
2022-12-05T20:25:16.807+00:00

I use a script set to run at logon to pin network folders to quick access on user desktops. After this update users that logon no longer see their shared folders. I am guessing it is due to the quick access being changed to "Home" in Windows 11 22H2.

Any idea why this script would no longer function via GPO logon script? It works on every other version of Windows in our environment.
If I run the script manually on the affected devices in Powershell it works and will repopulate the shared folders, but they will disappear again when the user logs off and back on.

$folder1 = "\my.domain.com\asharedfolder"
$QuickAccess = New-Object -ComObject shell.application
$QuickAccess.Namespace($folder1).Self.InvokeVerb("pintohome")

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,724 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,355 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Philippe Levesque 5,681 Reputation points MVP
    2022-12-06T13:49:56.617+00:00

    Hi

    Like we discussed in comment; I higly recommand that settings firrst;

    You need to create another for that one as it's a computer settings

    Computer Configuration > Administrative Templates > System > Logon, enable the Always wait for the network at computer startup and logon setting.

    I recommand it as the problem you have can happen if the computer execute the script before the network card receive the IP and be ready on the network, as such the script can fail to map.

    0 comments No comments

  2. Limitless Technology 43,926 Reputation points
    2022-12-07T11:28:52.203+00:00

    Hello there,

    As the same script works fine with other versions this might one of the changes that has been brought to the 22H2 update.

    Try disabling the policy at Computer Configuration\Policies\Administrative Templates\System\Group Policy\Configure Logon Script Delay and see if that helps. I too doubt that the script is being executed before retrieving the required information.

    Something you might dig on here https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpscr/a8e62e3b-08f5-4c41-b77a-31f1ee4f3125

    You can also raise feedback to the Microsoft team. The Feedback Hub app lets you tell Microsoft about any problems you run into https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332

    --------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  3. Harald Groene 0 Reputation points
    2023-02-17T14:05:01.28+00:00

    Same problem here. Commands don't work onb WIndows 11 clients, when typed in a powershell session either.

    Works in Windows 10.

    Is there some registry change envolved?

    0 comments No comments

  4. CrankyZZ 0 Reputation points
    2023-03-28T10:25:55.1633333+00:00

    Did anyone work this out?

    I found that the pinned folder is added when i run the script and when i run the script for a 2nd time it gets removed and so on in a loop. This could explain why it's removed after log off/on assuming it then gets added back again with another log off/on.

    0 comments No comments