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

Rework #4

Merged
merged 3 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/powershell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# https://github.com/microsoft/action-psscriptanalyzer
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer

name: PSScriptAnalyzer

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '28 9 * * 3'

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
68 changes: 0 additions & 68 deletions PowerPlatform/readme.md

This file was deleted.

21 changes: 13 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@ Collection of PowerShell modules for Microsoft products, services and technologi
```bash
Root
├── .NET # Folder with modules for Microsoft dotNET.
├── sources # Folder with sources of the modules.
│ │
│ ├── .NET # Folder with modules for Microsoft dotNET.
│ │
│ ├── Azure # Folder with modules for Microsoft Azure.
│ │
│ ├── AzureDevOps # Folder with modules for Microsoft Azure DevOps.
│ │
│ ├── Entra # Folder with modules for Microsoft Entra.
│ │
│ └── PowerPlatform # Folder with modules for Microsoft Power Platform.
├── Azure # Folder with modules for Microsoft Azure.
├── AzureDevOps # Folder with modules for Microsoft Azure DevOps.
├── Entra # Folder with modules for Microsoft Entra.
├── PowerPlatform # Folder with modules for Microsoft Power Platform.
├── tests # Folder with tests of the modules.
├── license # License file.
└── readme.md # This file.
```
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,4 @@ function Dictionary.Merge
# Union both sets
return $result;
}
}

Export-ModuleMember -Function Dictionary.Merge;
};
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ function Azure.ApplicationInsights.CreateOrResetApiKey
return $result;
}
}

Export-ModuleMember -Function Azure.ApplicationInsights.CreateOrResetApiKey;
2 changes: 0 additions & 2 deletions Azure/CDN.psm1 → sources/Azure/CDN.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,3 @@ function Azure.CDN.EnableSecure
}
}
}

Export-ModuleMember -Function Azure.CDN.EnableSecure;
2 changes: 0 additions & 2 deletions Azure/DataFactory.psm1 → sources/Azure/DataFactory.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,3 @@ function Azure.DataFactory.SetTriggerState
}
}
}

Export-ModuleMember -Function Azure.DataFactory.SetTriggerState;
2 changes: 0 additions & 2 deletions Azure/ResourceGroup.psm1 → sources/Azure/ResourceGroup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,3 @@ function Azure.ResourceGroup.Remove
$null = Remove-AzResourceGroup -Name $resourceGroupName -Force;
}
}

Export-ModuleMember -Function Azure.ResourceGroup.Remove;
1 change: 0 additions & 1 deletion Azure/SqlServer.psm1 → sources/Azure/SqlServer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ function Azure.SqlServer.Database.ManageUserAccess
}
}

Export-ModuleMember -Function Azure.SqlServer.Database.ManageUserAccess;
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,3 @@ function Azure.DevOps.LoadAsVariables
}
}

Export-ModuleMember -Function Azure.DevOps.LoadAsVariables;
4 changes: 0 additions & 4 deletions Entra/Application.psm1 → sources/Entra/Application.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ function Entra.Application.Provision
}
}

Export-ModuleMember -Function Entra.Application.Provision;

function Entra.Application.Remove
{
<#
Expand Down Expand Up @@ -284,5 +282,3 @@ function Entra.Application.Remove
Remove-MgApplication -ApplicationId $objectId;
}
}

Export-ModuleMember -Function Entra.Application.Remove;
2 changes: 0 additions & 2 deletions Entra/Identity.psm1 → sources/Entra/Identity.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,3 @@ function Entra.Identity.AssignRole
Write-Host "Role [$roleName] assigned to Object with Id [$identityObjectId].";
}
}

Export-ModuleMember -Function Entra.Identity.AssignRole;
2 changes: 0 additions & 2 deletions Entra/Provision.psm1 → sources/Entra/Provision.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,3 @@ function Entra.Group.Remove
# remove object
Remove-MgGroup -GroupId $objectId;
}

Export-ModuleMember -Function Entra.Group.Remove;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Copyright = '© 2024 Stas Sultanov. All rights reserved'

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
DefaultCommandPrefix = 'PowerPlatform.'
DefaultCommandPrefix = 'PowerPlatform.'

# Description of the functionality provided by this module
Description = 'PowerShell interface for Microsoft Power Platform.'
Expand All @@ -41,12 +41,12 @@

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @(
'AdminEnvironment.Create',
'AdminEnvironment.Delete',
'AdminEnvironment.Retrieve',
'AdminEnvironment.RetrieveAll',
'AdminEnvironment.Update',
'BusinessUnit.GetRootId',
'Environment.Create',
'Environment.Delete',
'Environment.Retrieve',
'Environment.RetrieveAll',
'Environment.Update',
'ManagedIdentity.CreateIfNotExist',
'ManagedIdentity.DeleteIfExist',
'Role.GetIdByName',
Expand All @@ -66,7 +66,7 @@
ModuleList = @('PowerPlatform')

# Version number of this module.
ModuleVersion = '1.0.7'
ModuleVersion = '1.1.2'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()
Expand All @@ -78,7 +78,7 @@
PowerShellHostVersion = '1.0'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '7.0'
PowerShellVersion = '7.4'

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
Expand All @@ -87,13 +87,13 @@
IconUri = 'https://connectoricons-prod.azureedge.net/powerplatformforadmins/icon_1.0.1056.1255.png'

# A URL to the license for this module.
LicenseUri = 'https://github.com/stas-sultanov/ms-scripts/blob/main/license'
LicenseUri = 'https://github.com/stas-sultanov/ms-ps-modules/blob/main/license'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/stas-sultanov/ms-scripts/tree/main/PowerPlatform'
ProjectUri = 'https://github.com/stas-sultanov/ms-ps-modules/tree/main/PowerPlatform'

# ReleaseNotes of this module
ReleaseNotes = 'nothing yet'
ReleaseNotes = 'Basic set of functions to automatically provision environments.'

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @()
Expand Down
Loading