How to stop advertisements with immediate effect – SCCM 2007

Scenario: An advertisement went out for a package and we need to stop the advertisement with immediate effect to decrease impact to the client machines.

Below are 5 scenarios with its impact:-

Method 1: Stop the IIS service or the SMS_OFFER_MANAGER service on all servers.

Advantage: Everything stops
Disadvantage: Everything stops including normal client communications or any other distribution
 
Method 2: Delete the source package files off the DP(s) update: change the ntfs folder premissions to deny any client from reading the source files.
Advantage: All clients trying to run errant advertisement will say “Waiting For Content”
Disadvantage: Copying the package source back to the DP after everything calms down.
 
Method 3: Delete the Advertisement (Do not do this)
Advantage: Makes you feel better
Disadvantage: Does not stop any clients until a policy refresh is triggered. You also lose all tracking of the damage you have formed.

Method 4: Disable the Program

Advantage: Prevents further execution
Disadvantage: Does not stop any clients until a policy refresh is triggered.

Method 5: Expire the advertisement

Advantage: Prevents further execution
Disadvantage: Does not stop any clients until a policy refresh is triggered.

Summary: Best solution for immediate advertisement stop is Method 2. Delete the files off the DP.

Domain Join Script

As per one of the requirement in recent activity at Global IT Company, we have got the script which we can use to join a machine to domain and then restart the machine.

  • For Windows XP just need to run the script.
  • For Windows 7 we need to run CMD as administrator and then run the script.


Const JOIN_DOMAIN = 1 Const ACCT_CREATE = 2 Const ACCT_DELETE = 4
Const WIN9X_UPGRADE = 16
Const DOMAIN_JOIN_IF_JOINED = 32
Const JOIN_UNSECURE = 64
Const MACHINE_PASSWORD_PASSED = 128
Const DEFERRED_SPN_SET = 256
Const INSTALL_INVOCATION = 262144
strDomain = “Domain Name”
strPassword = “Password”
strUser = “Admiistrator”
Set objNetwork = CreateObject(“WScript.Network”)
strComputer = objNetwork.ComputerName
Set objComputer = GetObject(“winmgmts:{impersonationLevel=Impersonate}!\\” & _
strComputer & “\root\cimv2:Win32_ComputerSystem.Name='” & _
strComputer & “‘”)
ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
strPassword, _
strDomain & “\” & strUser, _
NULL, _
JOIN_DOMAIN + ACCT_CREATE)
Dim objShell
Set objShell = WScript.CreateObject(“WScript.Shell”)
objShell.Run “C:\WINDOWS\system32\shutdown.exe -r -t 0”
 

ACT 5.6 Database Process Logs

Issue: The Application Compatibility Toolkit version 5.6 log processing server does not process logs gathered from Windows 7 or Windows Server 2008 R2 machines with Service Pack 1 installed. These logs are moved to the Failed folder on the log share and the data is not entered into the database.

To resolve this problem, an entry describing Windows 7 Service Pack 1 or Windows Server 2008 R2 Service Pack 1 must be added to the ACT database’s Dbo.OS table. To do so, run the following SQL statement against the database that the ACT log processing service is using:
1.       Go to Start menu and open SQL Server Management Studio.
2.       Select Databases and select your ACT database.
3.       Click New Query and copy the below code as per the ACT server OS.
4.       Execute the Query.


To enable the parsing of Windows 7 Service Pack 1 logs:

INSERT INTO.[dbo].[OS]
([osID]
,[osName]
,[majorVersion]
,[minorVersion]
,[buildNumber]
,[servicePackName]
,[servicePackMajor]
,[servicePackMinor]
,[csdVersion]
,[productType]
,[suite]
,[publishedDate])
VALUES
(N’6.1.1′
,N’Windows 7 SP1′
,6
,1
,0
,N’Service Pack 1′
,1
,0
,N’Service Pack 1′
,0
,0
,’2011-02-22′)
GO

To enable the parsing of Windows Server 2008 R2 Service Pack 1 logs:

INSERT INTO [dbo].[OS]
([osID]
,[osName]
,[majorVersion]
,[minorVersion]
,[buildNumber]
,[servicePackName]
,[servicePackMajor]
,[servicePackMinor]
,[csdVersion]
,[productType]
,[suite]
,[publishedDate])
VALUES
(N’6.1.1.SRV’
,N’Windows Server 2008 R2 SP1′
,6
,1
,0
,N’Service Pack 1′
,1
,0
,N’Service Pack 1′
,3
,0
,’2011-02-22′)
GO

To verify follow the below process:-
1.       Open SQL Server Management Studio.
2.       Select Databases and select your ACT database.
3.       Select Tables and select dbo.os.
4.       Right click and select Top 1000 rows.
5.       Verify on the right hand side if ACT OS is appeared in the list.

Once the statement is executed successfully, any logs that failed to process can be moved back to the Uncompressed folder and will be processed by the ACT log processing service.

Disk Configuration Wizard Customization: MDT (WSIM)

This is regarding the activity recently I have completed at global IT services and consulting company . Their IT manager had a requirement that after creating the media when we boot up as per the LTI automation it automatically formats the drive and install new OS. But they want to see thewizardfor format and partition during installation so that their IT engineer can manually decide on the partition to install and proceed with Windows 7 installaion.

1. First we need to import the custom image captured in the deployment share.

2. Then we need to create Standard Client task sequence and disable Format and partition in Task Sequence as below.

3. Then go to OS info tab in Task Sequence.

4. Click on Unattend.xml

5. This will process and open the custom image in Windows system image manager.

6. Go to Components and then to Windows setup neutral.
7. Go to Disk Configuration. Right click and add the setting to Pass 1 WindowsPE.
8. Go to its properties on right hand side and make WillShowUI to Always.
9. Then click on Save and close the Windows SIM.
10. Click OK on task sequence properties.
11. Then go to deployment share properties.
12. And automate in the rules as per the requirement. Make sure for Deployment type give NEWCOMPUTER.
13. Right click on deployment share and then update deployment share.
14. Then go to media, right click and create new media.
15. Then go to media properties and specify the appropriate automation rule.
16. Again remember to specify NEWCOMPUTER in deployment type.
17. Click OK. Then update media content.
18. Once media is updated we get the iso file at the specified location.
19. Using this LiteTouchMedia iso, we can boot and install Windows 7 on client machines.
20. Here we have XP machine with 2 drives. We also have files on E drive.

21. Now I have copied the iso file on my base system which we can use to test the client machines.
22. Add the iso to the test PC and boot it from CD.
23. It will start loading files from iso to XP machines.
24. It will go through the normal deployment process.
25. Then just before installing the Windows 7 OS it will give us the Disk Configuration wizard where we can specify the configuration as required.
26. Then we can click on Next and go ahead with Windows 7 installation.
27. Now the deployment completed successfully.
28. Here we can see that XP machine migrated to Windows 7 and the data on E drive is still there.