Skip to content
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

Error in Example #153

Closed
Pher0ah opened this issue Jul 14, 2020 · 4 comments
Closed

Error in Example #153

Pher0ah opened this issue Jul 14, 2020 · 4 comments
Assignees

Comments

@Pher0ah
Copy link

Pher0ah commented Jul 14, 2020

Following the example in your README.md; I am stuck at the following line...

# Apply the mappings and persist to Azure Policy
Update-AzSecurityCenterSecureScoreControlMappings -PolicySetDefinition $policySetDef -ControlMappings $secureScoreMappings -PersistToAzurePolicy

Running this gives the below error:

Unable to find type [Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy.PsPolicySetDefinition].
+         [Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementat ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Azure...cySetDefinition:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

@sweiss3
Copy link

sweiss3 commented Jul 14, 2020

Hi @Pher0ah,

Can you please confirm that you have the Az.Resources powershell module installed?

You can verify by running this command:
Get-Module -ListAvailable | Where-Object {$_.Name -eq "Az.Resources"}

Please verify that you have at least version 2.0.1

Thanks,
Shahar

@Pher0ah
Copy link
Author

Pher0ah commented Jul 14, 2020

Hi @sweiss3 , I have 1.13.0 currently, I tried to update both Az and Az.Resources and I am still getting the same version.

@sweiss3
Copy link

sweiss3 commented Jul 28, 2020

Hi @Pher0ah , my apologies for the delay with this.

Can you please share which version of Powershell you are using, and how have you tried to update the version?

The script was tested using Powershell 5.

@TomJanetscheck
Copy link
Contributor

Hi @Pher0ah,
Does this issue still exist, or can it be closed? @sweiss3 requested your feedback three weeks ago.

Thanks and best,
Tom

@Azure Azure locked as resolved and limited conversation to collaborators Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants