Quantcast
Channel: Devolutions Forum - Recent Posts
Viewing all articles
Browse latest Browse all 19717

Topic "Import your TechNet Subscription (via XML)" a message from Stéfane Lavergne

$
0
0
First export your TechNet Subscription keys using this link

https://technet.microsoft.com/en-us/subscriptions/keys/

Serial Data entry is actually an AddOn therefore we need to jump through hoops to make it work.

SerialDataEntryConfiguration & DataEntryConnectionTypeInfo are two internal classes that are not documented. One needs internal workings to be able to write this type of script.

Enjoy

-------------------------------------------------------

cls;

[xml]$rss = Get-Content $args[0];

foreach ($product in $rss.YourKey.Product_Key)
{
Write-Host $product.Name;

$session = New-RDM-Session -Name $product.Name -Kind &quotDataEntry&quot
$session.Group = &quotTechNet Keys&quot
$session.MetaInformation.CustomField1Title = &quotKey type&quot
$session.MetaInformation.CustomField1Value = $product.Key.Type;
$session.MetaInformation.CustomField2Title = &quotClaimed date&quot
$session.MetaInformation.CustomField2Value = $product.Key.ClaimedDate;

$configuration = New-Object RemoteDesktopManager.AddOn.SerialDataEntryAddOn.SerialDataEntryConfiguration;
$configuration.Software = $product.Name;
$configuration.Serial = $product.InnerText;
$xml = $configuration.ToXml();

$dataEntryConnectionTypeInfo = New-Object Devolutions.RemoteDesktopManager.Business.DataEntryConnectionTypeInfo;
$dataEntryConnectionTypeInfo.DataEntryConnectionType = 7 <# AddOn #>;
$dataEntryConnectionTypeInfo.SubConnectionType = &quota067caf6-848a-4f33-9926-d03f9702aaf5&quot
$dataEntryConnectionTypeInfo.Data = $xml;

$session.DataEntry.ConnectionTypes.Add($dataEntryConnectionTypeInfo);

Set-RDM-Session $session -NoRefresh;
}
edited by stefane on 2/21/2013

Viewing all articles
Browse latest Browse all 19717

Trending Articles