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 "DataEntry"
$session.Group = "TechNet Keys"
$session.MetaInformation.CustomField1Title = "Key type"
$session.MetaInformation.CustomField1Value = $product.Key.Type;
$session.MetaInformation.CustomField2Title = "Claimed date"
$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 = "a067caf6-848a-4f33-9926-d03f9702aaf5"
$dataEntryConnectionTypeInfo.Data = $xml;
$session.DataEntry.ConnectionTypes.Add($dataEntryConnectionTypeInfo);
Set-RDM-Session $session -NoRefresh;
}
edited by stefane on 2/21/2013
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 "DataEntry"
$session.Group = "TechNet Keys"
$session.MetaInformation.CustomField1Title = "Key type"
$session.MetaInformation.CustomField1Value = $product.Key.Type;
$session.MetaInformation.CustomField2Title = "Claimed date"
$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 = "a067caf6-848a-4f33-9926-d03f9702aaf5"
$dataEntryConnectionTypeInfo.Data = $xml;
$session.DataEntry.ConnectionTypes.Add($dataEntryConnectionTypeInfo);
Set-RDM-Session $session -NoRefresh;
}
edited by stefane on 2/21/2013