profile.XO Framework

Use framework as stand-alone

If only the functionalities of the Framework are required and customer-specific mechanisms are used for execution, the Framework can be used as a stand-alone. The Framework includes the logic to customize certain things of a profile using PowerShell functions. The interface to the outside world is provided by the script Deploy-AllUserPackages.ps1. It initiates the Framework and executes all Profile Packages it finds in the passed root directory.
The Service also uses this script to deploy the Profile Packages. In addition, it prepares everything necessary for the Profile Package to be created correctly. If the Framework is to be used stand-alone without the Service, this can easily be done using the Windows logon/logoff script mechanism.

Stand-alone with Windows logon/logoff scripts

  1. Start Group Policy Editor
    • Right click on Windows icon -> Run or Windows key + R
    • then enter gpedit.msc
  2. Configure Deploy-AllUserPackages.ps1 script of the PSPM framework as a new Logon and Logoff PowerShell script.
    • Configure PowerShell Logon Script

Script:

C:\Program Files\RISC_Software\PowerShell_Profile_Management\Framework\Deploy-AllUserPackages.ps1
Parameters:
-DeploymentType "Logon" -PackageSourcePath "C:\PackageSource"  

gpedit.msc Pfad: Benutzerkonfiguration\Windows-Einstellungen\Skripts\Anmelden

  • Configure PowerShell Logoff Script

Script:

C:\Program Files\RISC_Software\PowerShell_Profile_Management\Framework\Deploy-AllUserPackages.ps1
Parameters:
-DeploymentType "Logoff" -PackageSourcePath "C:\PackageSource"

pedit.msc Pfad: Benutzerkonfiguration\Windows-Einstellungen\Skripts\Abmelden

  • Enable synchronous execution of logon scripts

This is necessary so that the Profile Packages are executed before the Explorer is started, which corresponds to the behavior of the profile.XO Service:

gpedit.msc Pfad: Benutzerkonfiguration\Administrative Vorlagen\System\Anmeldung

  • Disable delay of logon scripts execution

This is necessary so that the Profile Packages are executed immediately and before the profile configuration, which corresponds to the behavior of the profile.XO Service:

Abbildung: gpedit.msc – Logon-Skript Verzögerung konfigurieren

  • Create registry value DelayDesktopSwitchingTimeout

So that the Windows welcome screen is not always displayed for 30 seconds and the progress of the execution of the Profile Packages can be displayed. Otherwise it is executed in the background.

A reasonable value is 7 seconds.

Abbildung: regedit - RegKey DelayDesktopSwitchingTimeout erstellen

Script

Set-Location HKLM:\Software
New-ItemProperty -Type DWord -Path .\Microsoft\Windows\CurrentVersion\Policies\System -Name DelayDesktopSwitchingTimeout -value "7"
  • Done.

At each logon or logoff either the logon functions or the logoff functions of all profile packages are executed by means of the Deploy-AllUserPackages.ps1.