Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ACCIPP authored Mar 18, 2024
2 parents 11f9fe8 + a066b7c commit 6d8947c
Show file tree
Hide file tree
Showing 48 changed files with 200 additions and 140 deletions.
2 changes: 1 addition & 1 deletion BestPracticeAnalyser_Orchestration/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ param($Context)

$DurableRetryOptions = @{
FirstRetryInterval = (New-TimeSpan -Seconds 5)
MaxNumberOfAttempts = 3
MaxNumberOfAttempts = 1
BackoffCoefficient = 2
}
$RetryOptions = New-DurableRetryOptions @DurableRetryOptions
Expand Down
1 change: 1 addition & 0 deletions DomainAnalyser_All/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ $Result = [PSCustomObject]@{
GUID = $($Domain.Replace('.', ''))
LastRefresh = $(Get-Date (Get-Date).ToUniversalTime() -UFormat '+%Y-%m-%dT%H:%M:%S.000Z')
Domain = $Domain
NSRecords = (Read-NSRecord -Domain $Domain).Records
ExpectedSPFRecord = ''
ActualSPFRecord = ''
SPFPassAll = ''
Expand Down
70 changes: 33 additions & 37 deletions DomainAnalyser_Orchestration/run.ps1
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
param($Context)

try {
try {

$DurableRetryOptions = @{
FirstRetryInterval = (New-TimeSpan -Seconds 5)
MaxNumberOfAttempts = 3
BackoffCoefficient = 2
}
$RetryOptions = New-DurableRetryOptions @DurableRetryOptions
$DurableRetryOptions = @{
FirstRetryInterval = (New-TimeSpan -Seconds 5)
MaxNumberOfAttempts = 1
BackoffCoefficient = 2
}
$RetryOptions = New-DurableRetryOptions @DurableRetryOptions

# Sync tenants
try {
Invoke-ActivityFunction -FunctionName 'DomainAnalyser_GetTenantDomains' -Input 'Tenants'
}
catch { Write-Host "EXCEPTION: TenantDomains $($_.Exception.Message)" }
# Sync tenants
try {
Invoke-ActivityFunction -FunctionName 'DomainAnalyser_GetTenantDomains' -Input 'Tenants'
} catch { Write-Host "EXCEPTION: TenantDomains $($_.Exception.Message)" }

# Get list of all domains to process
$Batch = Invoke-ActivityFunction -FunctionName 'Activity_GetAllTableRows' -Input 'Domains'

$ParallelTasks = foreach ($Item in $Batch) {
Invoke-DurableActivity -FunctionName 'DomainAnalyser_All' -Input $item -NoWait -RetryOptions $RetryOptions
}

# Collect activity function results and send to database
$TableParams = Get-CippTable -tablename 'Domains'
$TableParams.Entity = Wait-ActivityFunction -Task $ParallelTasks
$TableParams.Force = $true
$TableParams = $TableParams | ConvertTo-Json -Compress
# Get list of all domains to process
$Batch = Invoke-ActivityFunction -FunctionName 'Activity_GetAllTableRows' -Input 'Domains'

try {
Invoke-ActivityFunction -FunctionName 'Activity_AddOrUpdateTableRows' -Input $TableParams
}
catch {
Write-Host "Orchestrator exception UpdateDomains $($_.Exception.Message)"
}
}
catch {
Write-LogMessage -API 'DomainAnalyser' -message "Domain Analyser Orchestrator Error $($_.Exception.Message)" -sev info
#Write-Host $_.Exception | ConvertTo-Json
}
finally {
Write-LogMessage -API 'DomainAnalyser' -message 'Domain Analyser has Finished' -sev Info
$ParallelTasks = foreach ($Item in $Batch) {
Invoke-DurableActivity -FunctionName 'DomainAnalyser_All' -Input $item -NoWait -RetryOptions $RetryOptions
}

# Collect activity function results and send to database
$TableParams = Get-CippTable -tablename 'Domains'
$TableParams.Entity = Wait-ActivityFunction -Task $ParallelTasks
$TableParams.Force = $true
$TableParams = $TableParams | ConvertTo-Json -Compress

try {
Invoke-ActivityFunction -FunctionName 'Activity_AddOrUpdateTableRows' -Input $TableParams
} catch {
Write-Host "Orchestrator exception UpdateDomains $($_.Exception.Message)"
}
} catch {
Write-LogMessage -API 'DomainAnalyser' -message "Domain Analyser Orchestrator Error $($_.Exception.Message)" -sev info
#Write-Host $_.Exception | ConvertTo-Json
} finally {
Write-LogMessage -API 'DomainAnalyser' -message 'Domain Analyser has Finished' -sev Info
}
Binary file removed Modules/AzBobbyTables/3.1.0/AzBobbyTables.PS.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Modules/AzBobbyTables/3.1.3/AzBobbyTables.PS.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'AzBobbyTables.PS.dll'

# Version number of this module.
ModuleVersion = '3.1.0'
ModuleVersion = '3.1.3'

# Supported PSEditions
CompatiblePSEditions = @('Core')
Expand Down Expand Up @@ -108,7 +108,14 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''
ReleaseNotes = '## [3.1.3] - 2024-01-20
### Added
- Added Sampler ([#48](https://github.com/PalmEmanuel/AzBobbyTables/issues/48)).
- Added support for user-assigned managed identities ([#54](https://github.com/PalmEmanuel/AzBobbyTables/issues/54)).
'

# Prerelease string of this module
# Prerelease = ''
Expand All @@ -130,4 +137,3 @@ PrivateData = @{
# DefaultCommandPrefix = ''

}

28 changes: 28 additions & 0 deletions Modules/AzBobbyTables/3.1.3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog for the module

The format is based on and uses the types of changes according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Added Sampler ([#48](https://github.com/PalmEmanuel/AzBobbyTables/issues/48)).
- Added support for user-assigned managed identities ([#54](https://github.com/PalmEmanuel/AzBobbyTables/issues/54)).

## [3.1.2] - 2024-01-05

### Added

- Help documentation for a DateTime problem caused by the SDK (#43).

### Fixed

### Changed

### Removed

## 3.1.1 - 2023-05-03

[Unreleased]: https://github.com/PalmEmanuel/AzBobbyTables/compare/v3.1.2...HEAD

[3.1.2]: https://github.com/PalmEmanuel/AzBobbyTables/compare/d854153aca6c5cce35a123deb86653a0d3289b07...v3.1.2
21 changes: 21 additions & 0 deletions Modules/AzBobbyTables/3.1.3/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Emanuel Palm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</TN>
<MS>
<S N="Name">AzBobbyTables</S>
<S N="Version">3.1.0</S>
<S N="Version">3.1.3</S>
<S N="Type">Module</S>
<S N="Description">A module for handling Azure Table Storage operations by wrapping the Azure Data Tables SDK.</S>
<S N="Author">Emanuel Palm</S>
<S N="CompanyName">PalmEmanuel</S>
<S N="Copyright">(c) Emanuel Palm. All rights reserved.</S>
<DT N="PublishedDate">2023-03-24T21:51:21-04:00</DT>
<DT N="PublishedDate">2024-01-20T16:49:22-05:00</DT>
<Nil N="InstalledDate" />
<Nil N="UpdatedDate" />
<URI N="LicenseUri">https://github.com/PalmEmanuel/AzBobbyTables/blob/main/LICENSE</URI>
Expand Down Expand Up @@ -43,8 +43,23 @@
</TN>
<DCT>
<En>
<S N="Key">Command</S>
<S N="Key">RoleCapability</S>
<Obj N="Value" RefId="3">
<TNRef RefId="1" />
<LST />
</Obj>
</En>
<En>
<S N="Key">Function</S>
<Ref N="Value" RefId="3" />
</En>
<En>
<S N="Key">DscResource</S>
<Ref N="Value" RefId="3" />
</En>
<En>
<S N="Key">Command</S>
<Obj N="Value" RefId="4">
<TNRef RefId="1" />
<LST>
<S>Add-AzDataTableEntity</S>
Expand All @@ -58,13 +73,6 @@
</LST>
</Obj>
</En>
<En>
<S N="Key">Function</S>
<Obj N="Value" RefId="4">
<TNRef RefId="1" />
<LST />
</Obj>
</En>
<En>
<S N="Key">Cmdlet</S>
<Obj N="Value" RefId="5">
Expand All @@ -83,20 +91,12 @@
</En>
<En>
<S N="Key">Workflow</S>
<Ref N="Value" RefId="4" />
</En>
<En>
<S N="Key">DscResource</S>
<Ref N="Value" RefId="4" />
</En>
<En>
<S N="Key">RoleCapability</S>
<Ref N="Value" RefId="4" />
<Ref N="Value" RefId="3" />
</En>
</DCT>
</Obj>
<Nil N="PowerShellGetFormatVersion" />
<Nil N="ReleaseNotes" />
<S N="ReleaseNotes">## [3.1.3] - 2024-01-20_x000A__x000A_### Added_x000A__x000A_- Added Sampler ([#48](https://github.com/PalmEmanuel/AzBobbyTables/issues/48))._x000A_- Added support for user-assigned managed identities ([#54](https://github.com/PalmEmanuel/AzBobbyTables/issues/54)).</S>
<Obj N="Dependencies" RefId="6">
<TNRef RefId="1" />
<LST />
Expand All @@ -113,28 +113,29 @@
<S N="copyright">(c) Emanuel Palm. All rights reserved.</S>
<S N="description">A module for handling Azure Table Storage operations by wrapping the Azure Data Tables SDK.</S>
<S N="requireLicenseAcceptance">False</S>
<S N="releaseNotes">## [3.1.3] - 2024-01-20_x000A__x000A_### Added_x000A__x000A_- Added Sampler ([#48](https://github.com/PalmEmanuel/AzBobbyTables/issues/48))._x000A_- Added support for user-assigned managed identities ([#54](https://github.com/PalmEmanuel/AzBobbyTables/issues/54)).</S>
<S N="isLatestVersion">True</S>
<S N="isAbsoluteLatestVersion">True</S>
<S N="versionDownloadCount">2</S>
<S N="downloadCount">2005</S>
<S N="packageSize">1261744</S>
<S N="published">3/24/2023 9:51:21 PM -04:00</S>
<S N="created">3/24/2023 9:51:21 PM -04:00</S>
<S N="lastUpdated">3/25/2023 4:22:25 PM -04:00</S>
<S N="versionDownloadCount">3242</S>
<S N="downloadCount">12058</S>
<S N="packageSize">1356423</S>
<S N="published">1/20/2024 4:49:22 PM -05:00</S>
<S N="created">1/20/2024 4:49:22 PM -05:00</S>
<S N="lastUpdated">3/18/2024 2:41:34 PM -04:00</S>
<S N="tags">azure storage table cosmos cosmosdb data PSModule PSEdition_Core PSCmdlet_Add-AzDataTableEntity PSCommand_Add-AzDataTableEntity PSCmdlet_Clear-AzDataTable PSCommand_Clear-AzDataTable PSCmdlet_Get-AzDataTableEntity PSCommand_Get-AzDataTableEntity PSCmdlet_Remove-AzDataTableEntity PSCommand_Remove-AzDataTableEntity PSCmdlet_Update-AzDataTableEntity PSCommand_Update-AzDataTableEntity PSCmdlet_New-AzDataTableContext PSCommand_New-AzDataTableContext PSCmdlet_Remove-AzDataTable PSCommand_Remove-AzDataTable PSCmdlet_New-AzDataTable PSCommand_New-AzDataTable PSIncludes_Cmdlet</S>
<S N="developmentDependency">False</S>
<S N="updated">2023-03-25T16:22:25Z</S>
<S N="NormalizedVersion">3.1.0</S>
<S N="updated">2024-03-18T14:41:34Z</S>
<S N="NormalizedVersion">3.1.3</S>
<S N="Authors">Emanuel Palm</S>
<S N="IsPrerelease">false</S>
<S N="ItemType">Module</S>
<S N="FileList">AzBobbyTables.nuspec|dependencies\System.Numerics.Vectors.dll|dependencies\System.Security.Principal.Windows.dll|dependencies\System.Threading.Tasks.Extensions.dll|dependencies\AzBobbyTables.Core.dll|dependencies\Microsoft.Bcl.AsyncInterfaces.dll|dependencies\Microsoft.Win32.Registry.dll|dependencies\System.Linq.Async.dll|dependencies\System.Runtime.CompilerServices.Unsafe.dll|dependencies\System.Text.Encodings.Web.dll|en-US\AzBobbyTables.PS.dll-Help.xml|AzBobbyTables.PS.dll|dependencies\Azure.Core.dll|dependencies\Microsoft.VisualStudio.Threading.dll|dependencies\System.Buffers.dll|dependencies\System.Memory.Data.dll|dependencies\System.Security.AccessControl.dll|dependencies\System.Text.Json.dll|AzBobbyTables.psd1|dependencies\Azure.Data.Tables.dll|dependencies\Microsoft.VisualStudio.Validation.dll|dependencies\System.Diagnostics.DiagnosticSource.dll|dependencies\System.Memory.dll</S>
<S N="FileList">AzBobbyTables.nuspec|CHANGELOG.md|dependencies\AzBobbyTables.Core.pdb|dependencies\Microsoft.VisualStudio.Validation.dll|dependencies\System.Memory.Data.dll|dependencies\System.Runtime.CompilerServices.Unsafe.dll|dependencies\System.Numerics.Vectors.dll|dependencies\System.Text.Json.dll|LICENSE|dependencies\AzBobbyTables.Core.dll|dependencies\System.Threading.Tasks.Extensions.dll|dependencies\Microsoft.VisualStudio.Threading.dll|AzBobbyTables.PS.pdb|dependencies\System.Security.AccessControl.dll|dependencies\Microsoft.Win32.Registry.dll|dependencies\System.Text.Encodings.Web.dll|AzBobbyTables.psd1|dependencies\System.Buffers.dll|dependencies\Azure.Data.Tables.dll|dependencies\System.Memory.dll|AzBobbyTables.PS.dll|dependencies\System.Diagnostics.DiagnosticSource.dll|dependencies\Microsoft.Bcl.AsyncInterfaces.dll|dependencies\System.Security.Principal.Windows.dll|en-US\AzBobbyTables.PS.dll-Help.xml|dependencies\System.Linq.Async.dll|dependencies\Azure.Core.dll</S>
<S N="GUID">eead4f42-5080-4f83-8901-340c529a5a11</S>
<S N="PowerShellVersion">7.0</S>
<S N="CompanyName">pipe.how</S>
</MS>
</Obj>
<S N="InstalledLocation">C:\Users\jduprey.CNS\Documents\GitHub\CIPP-API\Modules\AzBobbyTables\3.1.0</S>
<S N="InstalledLocation">C:\GitHub\CIPP Workspace\CIPP-API\Modules\AzBobbyTables\3.1.3</S>
</MS>
</Obj>
</Objs>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 6d8947c

Please sign in to comment.