GithubHelp home page GithubHelp logo

Comments (3)

Plork avatar Plork commented on July 23, 2024

after the install script you need to change your files and then use the "update" cmdlet to change them

 Update-AzSKOrganizationPolicy `
        -AppInsightLocation $location `
        -MonitoringDashboardLocation $location `
        -AppInsightName $AppInsightsName `
        -OrgName $Organization `
        -PolicyFolderPath $PolicyFolder `
        -ResourceGroupName $ResourceGroup `
        -StorageAccountName $StorageAccountName `
        -SubscriptionId $AzureSubscriptionId `
        -DoNotOpenOutputFolder  

from devopskit.

akamalov avatar akamalov commented on July 23, 2024

Thanks @Plork for the prompt reply. Did run this command as per your suggestion. Here is what I've got instead:

> Update-AzSKOrganizationPolicy -AppInsightName $AppInsightsName -OrgName $Organization -PolicyFolderPath $PolicyFolder -ResourceGroupName $ResourceGroup -StorageAccountName $StorageAccountName -SubscriptionId $SubId -AppInsightLocation $location -MonitoringDashboardLocation $location -DoNotOpenOutputFolder
================================================================================
AzSK Version: 3.15.0
================================================================================
Method Name: Update-AzSKOrganizationPolicy (UOP)
Input Parameters:
Name                        Alias Value
----                        ----- -----
AppInsightName
OrgName                           Test-AK
PolicyFolderPath                  /Users/user1/.azsk/policies
ResourceGroupName                 AK-AzSK-Test-001
StorageAccountName                XXXXXXXXXXXXX001
SubscriptionId                    XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
AppInsightLocation                eastus2
MonitoringDashboardLocation       eastus2
DoNotOpenOutputFolder             True

You can also use: uop -AppInsightName  -OrgName Test-AK -PolicyFolderPath /Users/user1/.azsk/policies -ResourceGroupName AK-AzSK-Test-001 -StorageAccountName XXXXXXXXXXX001 -SubscriptionId XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX -AppInsightLocation eastus2 -MonitoringDashboardLocation eastus2 -DoNotOpenOutputFolder
================================================================================
Running AzSK cmdlet using a generic (org-neutral) policy...
InvalidOperation: Multiple storage accounts found in resource group: [AK-AzSK-Test-001]. This is not expected. Please contact support team.
================================================================================
Logs have been exported to: '/Users/user1/.local/share/Microsoft/AzSKLogs/Sub_Enterprise/20190812_084624_UOP'
================================================================================
/Users/user1/.local/share/Microsoft/AzSKLogs/Sub_Enterprise/20190812_084624_UOP
>

Just to be on the safe side. The documentation does not say that I have to ru 'update' directive. Here is what it says:

You may want to change this message to something more detailed. (Or even use this as a mechanism to notify all users within the org about something related to AzSK that they need to attend to immediately.) In this example let us just make a simple change to this message. We will just add '*' characters on either side of the 'Contoso-IT' so it stands out a bit.

Steps:
i) Open the AzSk.json from your local org-policy folder

ii) Edit the value for "Policy Message" field by adding 3 '*' characters on each side of 'Contoso-IT' as under:

    "PolicyMessage" : "Running AzSK cmdlet using *** Contoso-IT *** policy"
iii) Save the file

iv) Run the policy setup command (the same command you ran for the first-time setup)

Testing:
The updated policy is now on the policy server.

So...it says to run policy setup command instead. I am confused...

from devopskit.

gfrascadorio avatar gfrascadorio commented on July 23, 2024

I had a similar problem to this on PowershellCore on Mac and Linux (and later noticed AzSK's supported PSEdition does not include 'core'). I was able to get Install-AzSKOrganizationPolicy to work by changing some mode bits and path separators. See this fork: https://github.com/gfrascadorio/BWAzSKDevOpsKit.git

from devopskit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.