CiscoDevNet / intersight-powershell

Cisco Intersight PowerShell
Apache License 2.0
16 stars 4 forks source link

Modifying BootPrecisionPolicy #165

Closed sysengineerinco closed 1 month ago

sysengineerinco commented 1 month ago

Describe the issue When using this command after building a policybucket with a new BootPrecisionPolicy, I see the following warning in the log in Intersight and the new boot policy is not applied:

This profile has configuration warnings for policies 'boot.PrecisionPolicy'. Continuing the deploy operation ignores these warnings. Policies with warnings might not be deployed. (screenshot below)

Command: Set-IntersightServerProfile -Moid $serverProfile.Moid -PolicyBucket $newPolicyList -action Deploy

If I use Intersight to change the boot policy, I get a warning about an inconsistent profile and activate requires reboot, this is the desired result. I can then deploy and activate without issue.

Version used

Expected behavior Boot policy is applied and ready to activate.

image

This worked without issue about 2 years ago but I haven't used the code since. Seems something has changed in Intersight that requires a change to my script.

With the warning above, the profile is missing the boot policy.

Using Intersight to change the boot policy:

image

image

Using PowerShell:

image

sysengineerinco commented 1 month ago

After some trial & error I found that we have to Set-IntersightServerProfile without the -action first, then Deploy, then Activate like this:

Set-IntersightServerProfile -Moid $serverProfile.Moid -PolicyBucket $newPolicyList Set-IntersightServerProfile -Moid $serverProfile.Moid -PolicyBucket $newPolicyList -action Deploy Set-IntersightServerProfile -Moid $serverProfile.Moid -PolicyBucket $newPolicyList -action Activate

Problem solved.

I saw in issue #141 where documentation didn't include the "Activate" action, that still seems to be the case on apidocs and GitHub.