Install SMLets on Windows Server 2012 without SCSM Console | Quisitive
Install SMLets on Windows Server 2012 without SCSM Console
October 29, 2013
Matthew Dowst
Wondering how to install SMLets on WIndows Server?

In order to run SMLets on a computer it must have some of the SCSM console DLLs installed. Anton Gritsenko wrote this great article about how to install these without the need to install the SCSM console. However, due to some of the changes made to Windows Server 2012 and 2012 R2, these steps will no longer work. The problem is you can no longer register DLLs by copying them to the assembly folder. You now have to use the gacutil.exe utility to registry them.

1. Download and Install SMLets – http://smlets.codeplex.com/

2. Open PowerShell and set the Execution Policy to remotesigned using the command:

Set-ExecutionPolicy remotesigned -force

3. Download Windows 8.1 SDK – http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx

4. Launch the SDK Installer

5. When prompted select the feature .NET Framework 4.5.1 Software Development Kit

6. Copy the files Microsoft.EnterpriseManagement.Core.dll and Microsoft.EnterpriseManagement.ServiceManager.dll from c:Program FilesMicrosoft System CenterService Manager 2010SDK Binaries to your Orchestrator server.

7. Open an elevated command prompt and navigate to the folder containing the Service Manager DLLs.

8. Enter the commands:
copy Microsoft.EnterpriseManagement.Core.dll C:WindowsassemblyMicrosoft.EnterpriseManagement.Core.dll /y
copy Microsoft.EnterpriseManagement.ServiceManager.dll C:WindowsassemblyMicrosoft.EnterpriseManagement.ServiceManager.dll /y

9. Once the DLL’s are copied you will not need to register them. Do this by entering the commands below:
“C:Program Files (x86)Microsoft SDKsWindowsv8.1AbinNETFX 4.5.1 Toolsgacutil.exe” /i “C:WindowsassemblyMicrosoft.EnterpriseManagement.Core.dll”
“C:Program Files (x86)Microsoft SDKsWindowsv8.1AbinNETFX 4.5.1 Toolsgacutil.exe” /i “C:WindowsassemblyMicrosoft.EnterpriseManagement.ServiceManager.dll”


10. Open C:Program FilesCommon FilesSMLetsSMLets.psm1

11. Add a # to the beginning on lines 4, 5, and 6 to comment them out.

#requires -version 2.0 # handy global variables $GLOBAL:SMADLL = ([appdomain]::CurrentDomain.getassemblies()|?{$_.location -match "System.Management.Automation.dll"}).location #$GLOBAL:SMDIR = (Get-ItemProperty 'hklm:/software/microsoft/System Center/2010/Service Manager/Setup').InstallDirectory #$GLOBAL:SMSDKDIR = "${SMDIR}SDK Binaries" #$GLOBAL:SMDLL = "${SMSDKDIR}/Microsoft.EnterpriseManagement.Core.dll" $GLOBAL:EMGTYPE = "Microsoft.EnterpriseManagement.EnterpriseManagementGroup" $GLOBAL:DATAGENDIR = "$psScriptRootDataGen"

12. Comment out line 46, and on line 47 add the line below change SCSMSERVERNAME with the name of your management server.

$GLOBAL:smdefaultcomputer = "SCSMSERVERNAME"
# load the Service Manager Core assembly set-alias -scope global load import-assembly #load $SMDLL | out-null $GLOBAL:smdefaultcomputer = "SCSMSERVERNAME"

13. Save and close SMLets.psm1