Create a group and add devices to the group
SirRuggie opened this issue · 9 comments
Good Morning,
reaching out to you once again to see if something can be implemented or if it already is if you could point me in the right direction.
I've been working with one of the Senior Engineers in Dell and he pointed me to this API in the following link.
I wanted to see if this could be implemented?
Create a group and add devices to the group
So you're looking to create a Services plugin group and add devices to the group? I'll look into it.
Yes sir!
This is possible with the current module. See below
# Get the example json. Edit and store this in a file or variable.
New-OMESupportAssistGroup -ExportExampleJson
# Create Services group from file
New-OMESupportAssistGroup -AddGroup $(Get-Content "C:\Temp\Group.json" -Raw) -Verbose
# Get newly created group
"Support Assist Test Group 1" | Get-OMEGroup | Format-List
$devices = $("859N3L3", "759N3L3" | Get-OMEDevice -FilterBy "ServiceTag")
"Support Assist Test Group 1" | Get-OMEGroup | Edit-OMESupportAssistGroup -Devices $devices -Verbose
I posted a more in-depth example using variables
https://github.com/dell/OpenManage-PowerShell-Modules/blob/main/Examples/ServicesGroupCreateAddDevices.ps1
I'm having trouble with adding the shipping details with the module.
The snippet you included above works, but the one I'm listing does not.
$GroupJsonString = @'
{
"Id": 0,
"Name": "string",
"Description": "string",
"ContactOptIn": true,
"DispatchOptIn": false,
"MyAccountId": "string",
"CustomerDetails": {
"PrimaryContact": {
"FirstName": "string",
"LastName": "string",
"Email": "string",
"Phone": "string",
"AlternatePhone": "string",
"TimeFrame": "10:00 AM-4:00 PM",
"TimeZone": "TZ_ID_66,
"ContactMethod": "phone"
},
"SecondaryContact": {
"FirstName": "string",
"LastName": "string",
"Email": "string",
"Phone": "string",
"AlternatePhone": "string",
"TimeFrame": "10:00 AM-4:00 PM",
"TimeZone": "TZ_ID_66",
"ContactMethod": "phone"
},
"ShippingDetails": {
"PrimaryContact": {
"FirstName": "string",
"LastName": "string",
"Email": "string",
"Phone": "string",
"AlternatePhone": "string"
},
"SecondaryContact": {
"FirstName": "string",
"LastName": "string",
"Email": "string",
"Phone": "string",
"AlternatePhone": "string"
},
"Country": "US",
"State": "string",
"City": "string",
"Zip": "string",
"Cnpj": "string",
"Ie": "string",
"AddressLine1": "string",
"AddressLine2": "string",
"AddressLine3": "string",
"AddressLine4": "string",
"PreferredContactTimeZone": "TZ_ID_66",
"PreferredContactTimeFrame": "10:00 AM-4:00 PM",
"TechnicianRequired": true,
"DispatchNotes": "string"
}
}
}
'@
The Shipping Details are related to auto parts dispatch so this will need to be set to true.
"DispatchOptIn": false,
"DispatchOptIn": true,
I set it to that and it's creating the group, but it is not checking that option inside of OME.