Originally posted here:
Can anyone tell me how to make it work during logoff? Maybe there is a way to tell my powershell script to log back in as a console only app to run export-layout and then log back out? Maybe a way to get the application that serves the .Net calss to work during logoff?
I halve already tried:
- Using GPO to prevent the registry from detaching during initial logoff
Computer Configuration->Administrative Templates->System-> UserProfiles
Do not forcefully unload the user registry at user logoff
- Using regasm to make sure the .Net GAC StartLayout dll is registered
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands\v4.0_10.0.0.0__31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.dll /tlb
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands.Resources\v4.0_10.0.0.0_en_31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.Resources.dll /tlb
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands\v4.0_10.0.0.0__31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.dll /tlb
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Windows.StartLayout.Commands.Resources\v4.0_10.0.0.0_en_31bf3856ad364e35\Microsoft.Windows.StartLayout.Commands.Resources.dll /tlb
- Tried changing the permissions on the RuntimeBroker
https://blogs.msdn.microsoft.com/emeadaxsupport/2010/01/26/unable-to-edit-the-dcom-settings-for-iis-wamreg-admin-service-on-a-windows-server-2008-r2-when-trying-to-configure-kerberos-authentication-for-role-centers/
:
Changed owner to local admins on HKEY_CLASSES_ROOT\AppID\{9CA88EE3-ACB7-47c8-AFC4-AB702511C276} and added full control for local admins
Using Component Services\DCOM Config\RuntimeBroker added allow all for everyone and identity "the launching user".
Here is the error:
Export-StartLayout : Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) At C:\Windows\System32\GroupPolicy\RoamStartTiles.ps1:52 char:1+ Export-StartLayout -Path $RoamStartTilesXMLPath+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [Export-StartLayout], COMException+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.StartLayout.Commands.Exp ortStartLayoutCommand