-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Describe the bug
We have encountered an issue when attempting to add an existing policy on an existing UCS server profile for CIMC. Please find below the workflow for the code.
Add the policy in policyBucket
Set-IntersightServerProfile on the UCS Server Profile
Add Start-Sleep for ~5 secs
Deploy the UCS Server Profile
Previously, it was not necessary to include Start-Sleep when adding a policy to policyBucket and then deploying the UCS Server Profile.
To Reproduce
Steps to reproduce the behavior
foreach ($serverProfile in $serverProfiles) {
$serverProfileDetail = Get-IntersightServerProfile -Name $serverProfile -Organization $org
$checkvKVMPolicy = $serverProfileDetail.PolicyBucket | Where-Object{$_.ActualInstance.ObjectType -eq "KvmPolicy"}
$serverProfileName = $serverProfileDetail.Name
$serverProfileDetail.PolicyBucket.Add($kvmPolicy)
$ScheduledActions11 = Initialize-IntersightPolicyScheduledAction -Action "Deploy"
$ScheduledActions21 = Initialize-IntersightPolicyScheduledAction -Action "Activate" -ProceedOnReboot $false
$serverProfileKVM = @()
$serverProfileKVM = $serverProfileDetail | Set-IntersightServerProfile
Start-Sleep -s 5
Write-Host "Update policy bucket for UCS Server Profile $serverProfileName .... `n" -ForegroundColor Green
$serverProfileKVM | Set-IntersightServerProfile -ScheduledActions @($ScheduledActions11, $ScheduledActions21) -Action "Deploy" | Out-Null
Write-Host "Re-Deploying UCS Server Profile $serverProfileName .... `n" -ForegroundColor Yellow
Start-Sleep -s 5
}
**
Version used
Intersight PowerShell Module version (1.0.11.18775) and (1.0.11.2024100405)
Expected behavior
Can the back-end handle the pause instead of adding it in the scripts?
Screenshots
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels