Endpoint Protection

 View Only

Installing SCCM agent via SEP / SNAC 

Nov 27, 2013 07:45 AM

Most of the organizations use SCCM to deploy Third party software, OS patches etc to endpoints.It’s a very tedious process for the SCCM admin to verify if all the endpoints are 100% compliant.

I would like to present a solution where you can ensure whether the SCCM agent is running / services are enabled / disabled. Depending on the result it can start the services or download the installation files and locally install the SCCM agent on the endpoint.

So here is how SNAC can help you tackle this problem.

The best part is this requires no Hardware enforcers or DHCP software plug-in to be configured.

Pre-requisites:

1.           Make sure your SEPM 11 / 12 is SNAC ready. In Policies Tab you see Host Integrity Policy option, if not you can add SNAC.xml file to the License folder in SEPM.

Note: Please restart SEPM services, on adding SNAC license.

2.           Ensure SEP is functioning properly on endpoints.

3.           Create an HI policy and assign it to groups

4.           Copy the required SCCM agent installation files to a shared network folder or an internal Http / FTP site

Let's see how to create an HI policy, to check if SCCM agent is installed / disabled / stopped / uninstalled.

1.      Login to SEPM

2.      Click on Policies and select Host Integrity

sepm.png

3.     On the Right Pane, right Click and Select “Add”

sepm_0.png

4.      Enter a description for the policy

SEPM1.jpg

5.      Click on “Requirements”

sepm-2.png

6.      Click on “Add”, select “Custom requirement” and click “OK”

sepm-3.png

7.      Click on “Add” and select “IF... THEN”

sepm-4.png

8.      Check for services “ccmexec” and “bits” if running on endpoint

o   On the right pane, In Select a condition --à Scroll and select “Utility: Service is running”

o   Under “Check if the following service is running” --à Enter the Service name  “CcmExec”

SEPM2.jpg

9.      On the Left Pane - check for another service

o   Right Click on “Utility Service is running”

o   Click on “Add”

o   Click on “AND”

SEPM3.jpg

10.   On the right pane

o   In Select a condition --à Scroll and select “Utility: Service is running”

o   Under “Check if the following service is running” --à Enter the Service name  “BITS”

SEPM4.jpg

11.   On the Left Pane ---àclick on “THEN” --àEnter the comment “SMS agent is running”

SEPM5.jpg

12.   On the Left pane, Click on “THEN” comment “SMS agent is running” --à click “ADD” --àSelect “Return”

SEPM6.jpg

13.   On the right pane, select “Pass”

SEPM7.jpg

Note:   If both the services are running on the endpoint the HI policy will “Pass”.

If both the services / either service is not running the HI policy will “Fail”.

If the services are disabled, we can start the service via HI policy.

If SMS agent is not installed, we can download the files and execute locally via the HI policy.

 

Restart of SCCM services – Disabled / stopped

14.   On the left Pane, click on “THEN” click on “Add”  and select “Else”

SEPM8.jpg

15.   Enter the comment “Start SCCM service”

SEPM9.jpg

16.   Click on “Else --->Comment ---->Start SMS service” click on “Add” click “Function” and select “Utility: Run a program”

SEPM10.jpg

17.   On the Right Pane, under specify the command type “net start bits”

SEPM11.jpg

18.   Click on “Add” click “Function” and select “Utility: Run a program”

o   On the Right Pane, under specify the command type “net start ccmexec”

SEPM12.jpg

Installation of SCCM Agent

19.   Check for services “ccmexec” and “bits” running on endpoint.

o   On the left pane click on “Utility: Run a program” click on “Add” click on “IF…..THEN”

SEPM13.jpg

20.   On the right pane

o   In Select a condition --à Scroll and select “Utility: Service is running”

o   Under “Check if the following service is running” --à Enter the Service name  “ccmexec”

SEPM14.jpg

21.   Add an check for another service

o   In Select a condition --à Scroll and select “Utility: Service is running”

o   Under “Check if the following service is running” --à Enter the Service name  “bits”

SEPM15.jpg

22.   Click on “THEN” and insert a comment “SMS agent is running”

SEPM16.jpg

23.   On the Left pane, Click on “THEN” comment “SMS agent is running” --à click “ADD” --àclick  “Return” and select “Pass” on the right pane

SEPM17.jpg

Note: If the services are not running / the agent is not deployed. Initiate installation files to be downloaded from an ftp / network shared folder and be executed locally.

24.   On the left Pane, click on “THEN” click on “Add”  and select “Else”

SEPM18.jpg

25.   On the Left Pane ---àclick on “ELSE” --àclick on “Add” --à click on “Function” and select “File: Download a File”

o   Under “Download the file” provide path to download the files and provide a “Target folder” locally to copy the files

Note: copy all the SCCM agent installation files ( MHosts.vbs, ccmclean.exe, ccmdelcert.exe, cmsetup.exe, delete.cmd, excluded.txt, local.vbs, lmhosts, sleep.exe, Trace32.exe, UI_local.cmd) to  %systemroot%\system32 folder

Execute the script: Cscript local.vbs

As per the screenshot above, customer created a bat file. It contained a script to copy the installation files and execute (Cscript local.vbs) locally

Click on “Add” --àclick on “Function” and select “Utility: Run a Program”

o   Under “Specify the command” enter the command “c:\temp\sccmagent.bat”

SEPM19.jpg

26.   On the Left pane, Click on “Utility: Run a program ” click “Add” click “Return”

o   Select “Pass”

SEPM20.jpg

Statistics
0 Favorited
3 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jan 13, 2014 02:55 AM

thank you

Dec 30, 2013 07:12 AM

Hi Chihung,

The SCCMagent.bat file, created by the customer had all the SCCM agent installation files with variables for endpoint installation.

Customer is not willing to share the bat file. The bat file was uploaded to an ftp folder, they didn't provide it to me.

You will have to check with your SCCM team or with Microsoft.

Dec 22, 2013 10:17 PM

hi

Can you send me the file " SCCMagent.bat " . 

Thank you.

Related Entries and Links

No Related Resource entered.