forked from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunSCuBA.ps1
35 lines (31 loc) · 1.24 KB
/
RunSCuBA.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<#
# For end user modifications.
# See README for detailed instructions on which parameters to change.
#>
param (
[switch]
$Version
)
$LogIn = $true # Set $true to authenticate yourself to a tenant or if you are already authenticated set to $false to avoid reauthentication
$ProductNames = @("aad", "defender", "exo", "onedrive", "sharepoint", "teams") # The specific products that you want the tool to assess.
$Endpoint = "usgov" # Mandatory parameter if running Power Platform. Valid options are "dod", "prod","preview","tip1", "tip2", "usgov", or "usgovhigh".
$OutPath = "./Reports" # Report output directory path. Leave as-is if you want the Reports folder to be created in the same directory where the script is executed.
$OPAPath = "./" # Path to the OPA Executable. Leave this as-is for most cases.
$SCuBAParams = @{
'Login' = $Login;
'ProductNames' = $ProductNames;
'Endpoint' = $Endpoint;
'OPAPath' = $OPAPath;
'OutPath' = $OutPath;
}
$ManifestPath = Join-Path -Path "./PowerShell" -ChildPath "ScubaGear"
#######
Import-Module -Name $ManifestPath -ErrorAction Stop
if ($Version) {
Invoke-SCuBA @SCuBAParams -Version
}
else {
Invoke-SCuBA @SCuBAParams
}
Remove-Module "ScubaGear" -ErrorAction "SilentlyContinue"
#######