vielleicht kann mir einer von Euch weiterhelfen.
Wir strukturieren gerade die Empirumgruppen um. Ich möchte gern einen vorhanden Rechner (oder mehrere) in eine vorhandene Zuweisungsgruppe aufnehmen.
Beispiel :
Rechner "WS-0815" soll in Zuweisungsgruppe "Software_1" aufgenommen werden. Leider ist das nicht via EmpExtActivate.exe möglich, daher hier die Frage nach einem Script für die SDK.
In den Beispielen habe ich schon gesucht, kann aber das vorhandene Script nicht ändern, das ich keine Erfahrung via PS oder SDK besitze. Vielleicht kann mir dazu einer helfen.
Hier das Script was ich benutzt habe ...
Code: Select all
# Define the connection information
$ServerName="xxSERVERNAMExx"
$Port=9100
$UserName="xxuserxx"
$Password="xxpasswordxxx"
param([string]$ServerName, [int32]$Port, [string]$UserName, [string]$Password)
if(-not($ServerName) -or -not($Port) -or -not($UserName) -or -not($Password))
{
Write-Error "Missing expected parameters!"
Write-Warning "USING: CloneComputer.ps1 -ServerName <String> -Port <Int32> -UserName <String> -Password <String>"
exit 1
}
#Connect to the Empirum-API
$session = Open-Matrix42ServiceConnection -ServerName $ServerName -Port $Port -UserName $UserName -Password $Password
if($session -eq $null)
{
Write-Error "Connection to Empirum Session failed!"
exit 1
}
#Find the computer, that should be cloned
$template = $session.Computers | Where{ $_.Name -eq "WS-0815" }
if($template -eq $null)
{
Write-Warning "The computer, that should be cloned, not found!"
exit 1
}
Danke und Gruß
J.Schneider