-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assistance assigning IMC policy to Server Profile #151
Comments
Not sure if others might have a better way but in the past I would read in the profile's policy bucket, edit it, and then push it back out with whatever changes I needed to make (would be way easier though if we could do Set-IntersightServerProfile -ImcAccess xyz -Syslog xyz -Bios xyz if there is not already an enhancement like this)
|
@briamorr I'll give this method a shot. Thanks. |
@briamorr I see what you're doing here. You are taking the existing policies, replacing/adding the IMC policy and then reapplying the policy bucket. I assume this means that if I attempted to apply the policy bucket that ONLY had the IMC policy in it, it would wipe the rest of the policies? |
@tbrock47 - Correct, if you do not read in the existing policy bucket items and rewrite them back then you would just end up with only the IMC policy attached to the profile and all the other policies would be detached from the profile. |
Understood. With that said, I ran your code and it worked perfectly. Thanks! |
@briamorr Somewhat related. How do you go about detaching and attaching templates on profiles? Here is what I have that I thought would work to attach a template, but nothing happened, and I received no errors.
|
@tbrock47 -
|
oof. I miss ucsm powershell more and more. |
@briamorr Both of the Initialize commands result in object with a ClassId of 'AaaAuditRecord'. I doubled checked the ClassId values in $destTemplate and $profile and they were set as "ServerProfileTemplate" and "ServerProfile" respectively. ObjectType was assigned correctly. 'AaaAuditRecord' isn't correct is it?
|
@tbrock47 - you can do something like this if you are running an older version where New-IntersightBulkMoMerger is still able to run:
For the generic cmdlet workaround we just need the Moid of the profile and template so in reality we probably don't need to even initialize the basemo and can just take it directly from the profile and template objects |
Running 1.0.11.15830.
Thank you again as always sir. |
@briamorr Thank for all the help so far. I do have a question to pose. Attaching a ServerProfile to a ServerProfileTemplate should be as straight forward as... I do notice what while the command executes and indeed assigns the template to the profile, it does not automatically validate the profile settings match the templates settings (policies) in the way the GUI does. You mentioned using "New-IntersightBulkMoMerger" before, which sounds like it performs the desired function by mirroring the GUI experience (When New-IntersightBulkMoMerger was not bugged that is). So my question is, did "Set-IntersightServerProfile -SrcTemplate" ever work as I expected it to, or was using "New-IntersightBulkMoMerger" always the correct method? If it never worked, what is even the point of the -SrcTemplate parameter other than to pass $null to remove a template if passing a template to it doesn't fully emulate the GUI? |
@tbrock47 - From a simplicity standpoint I would agree that the SDK should transparently handle the bulkmomerger step if -SrcTemplate is defined (or the backend should just establish a continuously updating relationship). Will defer to the development team though on whether that is feasible as an enhancement |
I'm looking for assistance on the proper syntax used to assign an existing Access Policy to an existing Server Profile.
Given the following, how to I assign $IntersightAccessPolicy to $IntersightserverProfile?
I'm not quite sure how to supply the correct commands to Set-IntersightServerProfile.
The text was updated successfully, but these errors were encountered: