Download and install SMlets from codeplex.
Copy the files
Microsoft.EnterpriseManagement.Core.dll and
Microsoft.EnterpriseManagement.ServiceManager.dll from c:\Program Files\Microsoft System
Center\Service Manager 2010\SDK Binaries\ to your server.
Run Powershell as admin and run the following code to register the dlls
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("C:\sources\Microsoft.EnterpriseManagement.Core.dll")
$publish.GacInstall("C:\Sources\Microsoft.EnterpriseManagement.ServiceManager.dll")
Configure the module to run on a server without the console installed. Open C:\Program Files\Common Files\SMlets\Smlets.psml as administrator.
Comment out line 4, 5, 6 and 46
Add the following on line 47 to point to your SDK server:
$GLOBAL:smdefaultcomputer="scsmservername"
Note:
This will break your scripts that use the -ComputerName parameter in the SMlets. If you want to continue using this parameter if you manage several ServiceManager instances from one server, you can skip the last line addition.
Note2:
If you skip the last line, you can avoid using the -ComputerName parameter on all SMlets cmdlets by adding a default parameter at the beginning of your script like this:
$PSDefaultParameterValues.Add("*SCSM*:ComputerName","your.scsm.server")
Ingen kommentarer:
Legg inn en kommentar