login vsi company logo login vsi company logo 250x40
  • Home
  • Blog
  • Login AM
  • SCCM Control Component - Prevent Interference with Login AM 2012

SCCM Control Component - Prevent Interference with Login AM 2012

SCCM Control Component - Prevent Interference with Login AM 2012

If you are, out of business reasons, in the situation that your servers can not completely be managed by Login AM or you need to share your maintenance window with, for example SCCM, then you need to be sure that none of these deployment solutions interfere with each other. 

For this situation we developed a component that takes care of the SCCM 2007 Agent.

To be able to deploy and maintain clients with Login AM, without having problems with the SCCM Agent, a custom component with the goal to control the SCCM Agent has been developed. This blog describes the SCCM Control Component.

This custom component is placed under the Solution 4 Component.

custom component for controling the sccm agent

Custom component for controling the SCCM Agent

The component has a System ActionSet with two phases:

system actionset

System ActionSet

System - StartUpBegin

This phase is started after every reboot of the Login AM Client. It contains two tasks.

system startupbegin sccm copy

System StartIpBegin - SCCM copy

First task is the SCCM-Copy.ps1 script – it copies all necessary files like the SCCM-automation.dll from the S4_Sources folder to the %S4_Files%\Framework\SCCM folder on the client.

The second task is the SCCM-Client-disable.ps1 script that is responsible for disabling the SCCM service if there are no deployments currently running, otherwise the script will wait until the SCCM Agent service is inactive.

System - StartUpEnd

This phase contains a custom action set that executes a script responsible for enabling the SCCM agent again. Script name is SCCM-Client-enable.ps1.

system startupend sccm client enable

System StartUpEnd - SCCM Client enable

Integration in component set Login AM

The custom component SCCM Control needs to be integrated in a component. As the scripts needs to run during deployment phase and every maintenance task, the best place to integrate it has been the Solution4 Base component set.

As the SCCM Client needs to be disabled before the Login AM Deployment starts it is necessary to change the startupBeginOrderNumber as shown in the screen shot below.

solution 4 sccm control

Solution 4 SCCM Control

Changes to standard Login AM framework

To be able to control the SCCM Agent also during Login AM Initialization we needed to change one small thing to the standard Login AM framework files.

The file that has been modified is Initialize-Solution4.ps1 and is located in the following folder:

%S4_Files%\Components\Solution4\Framework\Extensions\Framework\General

The section that has been modified is the section that builds the init script on the S4 client. The section is between row 116 and 123.

The change in this file is that if a file named pre-init.ps1 exists in the S4-Files location, this will be executed before the standard init.ps1 script is executed. In this case the pre-init.ps1 script does nearly the same as the SCCM-disable.ps1 script, it disables the SCCM Agent service.

#Create Init script
Set-Content -path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "$s4_files\Init.ps1 -e $S4_EnvironmentID" | out-null
Add-Content -path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "schtasks.exe /Delete /TN `"Solution4 Initialization`" /F"

After:

#Create Init script
If (Test-Path -Path "$S4_files\pre-init.ps1") {
	Set-Content -Path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "$s4_files\Pre-Init.ps1" | out-null
	Add-Content -path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "$s4_files\Init.ps1 -e $S4_EnvironmentID" | out-null
} Else {
	Set-Content -path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "$s4_files\Init.ps1 -e $S4_EnvironmentID" | out-null
}
Add-Content -path "\\$ComputerName\admin$\Initialize-Solution4.ps1" 
-value "schtasks.exe /Delete /TN `"Solution4 Initialization`" /F"

This modification will probably move into the standard of future Login AM versions so that every customer has the possibility to execute necessary tasks before the initialization of Login AM.

The necessary scripts and the component itself can be found here and are provided “as is” without warranty.

Tags: How-to, Microsoft, Login AM

Popular Blogs

login-vsi-vdi-performance-summit

The VDI Performance Summit - Virtual Conference and Expo

Visit the VDI Performance Summit to gain knowledge and experience about performance and tuning VDI, improving End-User Experience and IT service. Join us at the ONLY virtual event 100% dedicated to VDI performance and tuning | May 2, 2019 This 1-day event offers key-notes presented by the best VDI performance experts in the world, technical and business oriented breakout sessions, the possibility to chat with experts directly to discuss your own situation, and a virtual exhibit hall featuring… Continue Reading

Scalability testing Parallels Remote Application Server with Login VSI

Recently I went to VMworld in Barcelona where Login VSI had a booth on the expo... While I can’t remember exactly how many conversations I had - there had been so many that I lost my voice on day one. What was new this year is that quite a few people asked if our software is compatible with the solutions from Parallels specifically their Remote Application Server (RAS) (Datasheet). Continue Reading
Login VSI Blog Article - Microsoft Windows 10 Default FTA Associations - Teaser Image

Windows 10 Default File Type Associations and Login VSI

When Login VSI 4.1 was released, the majority of desktops were running Windows 7 and life was easy. We’d set the default filetype for an application and it would simply work. The default and industry standard workloads in Login VSI include launching and using Adobe Reader as part of the virtual user simulation. Because Login VSI doesn’t always know which version of Adobe Reader is installed, or where it’s installed, the workload relies on the file type association (FTA) for .pdf documents to be… Continue Reading
Login VSI - Press Release - IGEL - Login VSI Partner to Optimize End User Computing Experience Image

[Press Release] IGEL Partners with Login VSI to Optimize the End User Computing Experience

Login PI enables organizations to better protect the performance and availability of their IGEL OS-powered virtual desktop environments San Francisco, USA, Feb. 6, 2019: IGEL, a world leader in software-defined endpoint optimization and control solutions for the secure enterprise, today announced that it is partnering with Login VSI, provider of software solutions to test and actively monitor the performance and availability of virtual desktop environments, including VDI and… Continue Reading
Login VSI - Blog - Login PI Blog Teaser Image - Windows Virtual Desktop: How To Monitor User Experience With Login PI

Windows Virtual Desktop – How to Monitor User Experience?

Microsoft has just announced the public preview of their new Windows Virtual Desktop (WVD) offering at Microsoft Ignite on Tour in Amsterdam today. For those of you who’ve not followed the rumors or the private beta, here’s the outline... Continue Reading
Investigating Online Application Performance with Login PI

Investigating Online Application Performance with Login PI

As many companies do, we use a CRM system. Recently, I have been getting complaints about our cloud CRM system, Microsoft Dynamics, being slow. I tried to investigate this by shadowing one of our users to see what was wrong. As expected, everything was fast. 15 minutes later, the same user reported slowness again. How could I investigate this without bothering the users? Continue Reading
Cookie Settings