Skip to content

Commit

Permalink
update monkey365
Browse files Browse the repository at this point in the history
  • Loading branch information
silverhack committed Aug 9, 2024
1 parent 40cc91f commit 0cd69db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 68 deletions.
12 changes: 4 additions & 8 deletions Invoke-Monkey365.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ Function Invoke-Monkey365{
With Monkey365, there is also support for exporting data driven to popular formats like CSV, XML or JSON.
Office Support
Support for exporting data driven to EXCEL format. The tool also support table style modification, chart creation, company logo or independent language support. At the moment Office Excel 2010, Office Excel 2013 and Office Excel 2016 are supported by the tool.
Note: EXCEL application must be installed on machine.
.NOTES
Author : Juan Garrido
Twitter : @tr1ana
Expand All @@ -77,12 +73,12 @@ Function Invoke-Monkey365{
This example retrieves information of an Azure subscription and prints results to a local variable. If credentials are not supplied, Monkey365 will prompt for credentials.
.EXAMPLE
Invoke-Monkey365 -ClientId 00000000-0000-0000-0000-000000000000 -ClientSecret ("MySuperClientSecret" | ConvertTo-SecureString -AsPlainText -Force) -Instance Azure -Analysis All -subscriptions 00000000-0000-0000-0000-000000000000 -TenantID 00000000-0000-0000-0000-000000000000 -ExportTo CLIXML,EXCEL,CSV,JSON,HTML
Invoke-Monkey365 -ClientId 00000000-0000-0000-0000-000000000000 -ClientSecret ("MySuperClientSecret" | ConvertTo-SecureString -AsPlainText -Force) -Instance Azure -Analysis All -subscriptions 00000000-0000-0000-0000-000000000000 -TenantID 00000000-0000-0000-0000-000000000000 -ExportTo CLIXML,CSV,JSON,HTML
This example retrieves information of an Azure subscription and will export data driven to CSV, JSON, HTML, XML and Excel format into monkey-reports folder. The script will connect to Azure using the client credential flow.
.EXAMPLE
Invoke-Monkey365 -certificate C:\monkey365\testapp.pfx -ClientId 00000000-0000-0000-0000-000000000000 -CertFilePassword ("MySuperCertSecret" | ConvertTo-SecureString -AsPlainText -Force) -Instance Microsoft365 -Analysis SharePointOnline -TenantID 00000000-0000-0000-0000-000000000000 -ExportTo CLIXML,EXCEL,CSV,JSON,HTML
Invoke-Monkey365 -certificate C:\monkey365\testapp.pfx -ClientId 00000000-0000-0000-0000-000000000000 -CertFilePassword ("MySuperCertSecret" | ConvertTo-SecureString -AsPlainText -Force) -Instance Microsoft365 -Analysis SharePointOnline -TenantID 00000000-0000-0000-0000-000000000000 -ExportTo CLIXML,CSV,JSON,HTML
This example retrieves information of an Microsoft 365 subscription and will export data driven to CSV, JSON, HTML, XML and Excel format into monkey-reports folder. The script will connect to Azure using the certificate credential flow.
.EXAMPLE
Expand Down Expand Up @@ -112,7 +108,7 @@ Function Invoke-Monkey365{
All Extract all information about an Azure subscription
.PARAMETER ExportTo
Export data driven to specific formats. Accepted values are CSV, JSON, XML, PRINT, EXCEL, HTML.
Export data driven to specific formats. Accepted values are CSV, JSON, XML, PRINT, HTML.
.PARAMETER ExcludedResources
Exclude unwanted azure resources from being scanned
Expand Down Expand Up @@ -198,7 +194,7 @@ Function Invoke-Monkey365{
[string[]]$ExcludeCollector,

[parameter(Mandatory= $false, HelpMessage= "Export data to multiple formats")]
[ValidateSet("CSV","JSON","CLIXML","PRINT","EXCEL", "HTML")]
[ValidateSet("CSV","JSON","CLIXML","PRINT","HTML")]
[Array]$ExportTo=@(),

[Parameter(HelpMessage="Compress Monkey365 output to a ZIP file")]
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ nav:
- Overview: docker/docker.md
- Export Data:
- Overview: exporting/exporting-data.md
- Excel: exporting/export-excel.md
- HTML: exporting/export-html.md
- Logging:
- Introduction: logging/introduction.md
Expand Down
2 changes: 1 addition & 1 deletion monkey365.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'monkey365.psm1'

# Version number of this module.
ModuleVersion = '0.91.3'
ModuleVersion = '0.91.4'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
60 changes: 2 additions & 58 deletions monkey365.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,10 @@ $LocalizedDataParams = @{
#Import localized data
Import-LocalizedData @LocalizedDataParams;

<#
$internal_functions = @(
'/core/analysis',
'/core/collector',
'/core/init',
'/core/utils',
'/core/html',
'/core/tasks',
'/core/watcher',
'/core/api/auth',
'/core/import',
'/core/office',
'/core/output',
'/core/tenant',
'/core/api/EntraID/graph',
'/core/api/EntraID/msgraph',
'/core/subscription'
'/core/api/azure/',
'/core/api/m365/MicrosoftTeams/',
'/core/api/m365/ExchangeOnline/'
'/core/api/m365/SharePointOnline/',
'/core/api/m365/M365AdminPortal/'
)
#>
<#
$internal_functions = @(
'/core/api/auth',
'/core/analysis',
'/core/init',
#'/core/collector',
'/core/utils',
'/core/html',
'/core/tasks',
'/core/watcher',
'/core/import',
#'/core/office',
#'/core/output',
'/core/tenant',
'/core/api/EntraID/graph',
'/core/api/EntraID/msgraph',
'/core/subscription'
# '/core/api/azure/',
#'/core/api/m365/MicrosoftTeams/',
#'/core/api/m365/ExchangeOnline/'
#'/core/api/m365/SharePointOnline/',
#'/core/api/m365/M365AdminPortal/'
)
#>

$internal_modules = @(
'core/modules/monkeyhttpwebrequest'
'core/modules/monkeyutils',
'core/modules/monkeylogger'
'core/modules/monkeyexcel',
'core/modules/psmarkdig',
'core/modules/monkeyruleset',
'core/modules/monkeyhtml',
Expand All @@ -71,10 +21,8 @@ $internal_modules = @(
)
$internal_modules.ForEach({Import-Module ("{0}{1}{2}" -f $PSScriptRoot,[System.IO.Path]::DirectorySeparatorChar, $_.ToString()) -Force})


$msal_modules = @(
'core/modules/monkeycloudutils',
'core/modules/monkeymsalauthassistant'
'core/modules/monkeycloudutils'
)
$msal_modules.ForEach({Import-Module ("{0}{1}{2}" -f $PSScriptRoot,[System.IO.Path]::DirectorySeparatorChar, $_.ToString()) -Scope Global -Force})

Expand Down Expand Up @@ -108,14 +56,12 @@ New-Variable -Name m365_plugins -Value $m365_plugins -Scope Script -Force
#Remove Job
Get-MonkeyJob | Remove-MonkeyJob


$internal_functions = @(
'/core/init',
'/core/utils',
'/core/collector',
'/core/api/auth',
'/core/html',
'/core/office',
'/core/tasks',
'/core/analysis',
'/core/import',
Expand All @@ -134,15 +80,13 @@ $internal_functions = @(
'/core/api/m365/M365AdminPortal/'
)


$all_files = $internal_functions.ForEach({
if([System.IO.Directory]::Exists(("{0}{1}" -f $PSScriptRoot,$_))){
If([System.IO.Directory]::Exists(("{0}{1}" -f $PSScriptRoot,$_))){
[System.IO.Directory]::EnumerateFiles(("{0}{1}" -f $PSScriptRoot,$_),"*.ps1",[System.IO.SearchOption]::AllDirectories)
}
})
$all_files = $all_files.Where({$_.EndsWith('ps1')})
$all_files.ForEach({. $_})


$monkey = ("{0}/Invoke-Monkey365.ps1" -f $PSScriptRoot)
. $monkey

0 comments on commit 0cd69db

Please sign in to comment.