Closed wgjhstt247 closed 7 months ago
I am not able to reproduce this issue, Can you provide us the exact error screenshot. Here is the same cmdlet I have run it.
Get-Module -Name Intersight.PowerShell | fl
Name : Intersight.PowerShell
Path : C:\1.0.11-12236\Intersight\Intersight.PowerShell.dll
Description : Intersight Powershell module provides the cmdlets to manage, analyze, and automate the IT infrastructure in Intersight.
ModuleType : Binary
Version : 1.0.11.13236
PreRelease :
NestedModules : {}
ExportedFunctions :
ExportedCmdlets : {Get-IntersightAaaAuditRecord, Get-IntersightAaaRetentionConfig, Get-IntersightAaaRetentionPolicy, Get-IntersightAccessIpAddress…}
ExportedVariables :
ExportedAliases :
Configure the required parameters
$basePath = "https://us-east-1.intersight.com"
$ApiKeyId = "5cd4exxxxxxxxxxx/5ef9bd0e7564612d328ebd60/64a3e20b756461xxxxxxxxxxxxxx"
$ApiKeyFilePath = "C:\\Users\\SecretKey.txt"
$config = @{
BasePath = $basePath
ApiKeyId = $ApiKeyId
ApiKeyFilePath = $ApiKeyFilePath
HttpSigningHeader = @("(request-target)", "Host", "Date", "Digest")
}
Set-IntersightConfiguration @config
For security reasons, I've crossed out sensitive information, but here's what I'm doing. I'm using a CVA appliance deployed locally.
Can you check the error message once you get the exception by using the below variable
$Error[0].Exception
It seems the old RestSgarp.dll is being used in you powershell session. Can you run the follwoing cmdlet to check the issue is common for all cmdlets.
# once you run Set-IntersightConfiguration please execute below cmdlet and check whether it works or same exception has been thrown like before.
Get-IntersightConfiguration # to check the Intersight Configuration.
Get-IntersightNtpPolicy
Get-IntersightManagedObject -ObjectType organization.Organization
Get-IntersightConfiguration
: Shows the correct output with the expected configurationGet-IntersightNtpPolicy
: The JSON string {Get-IntersightManagedObject -ObjectType organization.Organization
: No error. The output is in JSON format.It seems the exception is caused due to the object received from the server, Can you check the Get-IntersightOrganizationOrganization
here also you may encounter the same error multiple schema matched.
Please check the data on server side that any Mo has missing objectType or ClassId value or any enum type property has the value which is not supported now.
The same server side data returned by Get-IntersightOrganizationOrganization
works fine with the previous version of the powershell module. That said, I noticed that 'VersionContext' and 'DisplayNames' are not present on the objects returned from the Server with default parameters.
There are no MoId, objectType, or ClassId properties values missing.
@wgjhstt247 Did you tried with the latest Intersight.PowerShell module?
In version 1.0.11.13376 - Yes, same result.
@Ghufz This is still broken. Please fix this.
Please follow the workaround suggested by https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts?view=powershell-7.4#use-the-dependency-out-of-process
Refer to Section Use the dependency out of process
Describe the bug Error: Set-IntersightConfiguration: Error performing this operation. Check that BasePath and API Key identifier are configured correctly using the Set-IntersightConfiguration cmdlet.
To Reproduce Follow the steps provided in README to use Set-IntersightConfiguration
Version used
Expected behavior Successful response as in Module version 1.0.11.12738
Additional context The same configuration works fine in module version 1.0.11.12738