589 lines
64 KiB
HTML
589 lines
64 KiB
HTML
<!DOCTYPE html>
|
||
<!--
|
||
<auto-generated>
|
||
<synopsis>
|
||
This code was generated by a tool. on: 06/08/2024 15:55:13
|
||
</synopsis>
|
||
<description>
|
||
If you'd like to regenerate the documentation, please open up powershell and run
|
||
|
||
> .\psDoc.ps1 -moduleName NameOfYourModule
|
||
|
||
If the documentation is incomplete, or eronious,
|
||
please edit the comments at the top of the module method within it's respecive .ps1 file.
|
||
</description>
|
||
</auto-generated>
|
||
-->
|
||
<html lang="en">
|
||
<head>
|
||
<title>M365FoundationsCISReport Documentation</title>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
||
<link href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.min.css" rel="stylesheet" charset="utf-8">
|
||
<link href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCoreDefault.min.css" rel="stylesheet" charset="utf-8">
|
||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" charset="utf-8">
|
||
|
||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||
<!--[if lt IE 9]>
|
||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||
<![endif]-->
|
||
<style>
|
||
.syntaxhighlighter {
|
||
overflow-y: hidden !important;
|
||
overflow-x: auto !important;
|
||
}
|
||
pre {
|
||
min-height: 30px;
|
||
}
|
||
.navbar-nav {
|
||
height: 100%;
|
||
overflow-y: auto;
|
||
}
|
||
.form-group {
|
||
padding-top: 12px;
|
||
padding-left: 12px;
|
||
padding-right: 12px;
|
||
}
|
||
.sidebar-nav .navbar-header {
|
||
float: none;
|
||
}
|
||
.sidebar-nav .navbar li a {
|
||
padding-top: 4px;
|
||
padding-bottom: 4px;
|
||
}
|
||
@media (min-width: 768px) {
|
||
.sidebar-nav .navbar .navbar-collapse {
|
||
padding: 0;
|
||
max-height: none;
|
||
}
|
||
.sidebar-nav .navbar ul {
|
||
float: none;
|
||
}
|
||
.sidebar-nav .navbar ul:not {
|
||
display: block;
|
||
}
|
||
.sidebar-nav .navbar li {
|
||
float: none;
|
||
display: block;
|
||
}
|
||
}
|
||
</style>
|
||
|
||
</head>
|
||
<body>
|
||
<div class="container-fluid">
|
||
<div class="row-fluid">
|
||
<div><h1>M365FoundationsCISReport</h1></div>
|
||
</div>
|
||
<div class="row-fluid">
|
||
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-12">
|
||
<div class="sidebar-nav">
|
||
<div class="navbar navbar-default" role="navigation">
|
||
<div class="navbar-header">
|
||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse">
|
||
<span class="sr-only">Toggle</span>
|
||
<span class="icon-bar"></span>
|
||
<span class="icon-bar"></span>
|
||
</button>
|
||
<span class="visible-xs navbar-brand">click menu to open</span>
|
||
</div>
|
||
<div class="navbar-collapse collapse sidebar-navbar-collapse">
|
||
|
||
<div class="form-group">
|
||
<input class="form-control" id="searchinput" type="search" placeholder="Filter..." />
|
||
</div>
|
||
|
||
<ul class="nav navbar-nav list-group" id="searchList">
|
||
<li class="nav-menu list-group-item"><a href="#Get-AdminRoleUserLicense">Get-AdminRoleUserLicense</a></li>
|
||
<li class="nav-menu list-group-item"><a href="#Invoke-M365SecurityAudit">Invoke-M365SecurityAudit</a></li>
|
||
<li class="nav-menu list-group-item"><a href="#Sync-CISExcelAndCsvData">Sync-CISExcelAndCsvData</a></li>
|
||
</ul>
|
||
</div><!--/.nav-collapse -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-9 col-md-8 col-sm-7 col-xs-12">
|
||
<div id="Get-AdminRoleUserLicense" class="toggle_container">
|
||
<div class="page-header">
|
||
<h2> Get-AdminRoleUserLicense </h2>
|
||
<p>Retrieves user licenses and roles for administrative accounts from Microsoft 365 via the Graph API.</p>
|
||
<p>The Get-AdminRoleUserLicense function connects to Microsoft Graph and retrieves all users who are assigned administrative roles along with their user details and licenses. This function is useful for auditing and compliance checks to ensure that administrators have appropriate licenses and role assignments.</p>
|
||
</div>
|
||
<div>
|
||
<h3> Syntax </h3>
|
||
</div>
|
||
<div class="panel panel-default">
|
||
<div class='panel-body'>
|
||
<pre class="brush: ps">Get-AdminRoleUserLicense [-SkipGraphConnection] [<CommonParameters>]</pre>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h3> Parameters </h3>
|
||
<table class="table table-striped table-bordered table-condensed visible-on">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th class="visible-lg visible-md">Alias</th>
|
||
<th>Description</th>
|
||
<th class="visible-lg visible-md">Required?</th>
|
||
<th class="visible-lg">Pipeline Input</th>
|
||
<th class="visible-lg">Default Value</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><nobr>-SkipGraphConnection</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>A switch parameter that, when set, skips the connection to Microsoft Graph if already established. This is useful for batch processing or when used within scripts where multiple calls are made and the connection is managed externally.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h3> Inputs </h3>
|
||
<p>The input type is the type of the objects that you can pipe to the cmdlet.</p>
|
||
<ul><li>None. You cannot pipe objects to Get-AdminRoleUserLicense.</li></ul>
|
||
</div>
|
||
<div>
|
||
<h3> Outputs </h3>
|
||
<p>The output type is the type of the objects that the cmdlet emits.</p>
|
||
<ul><li>PSCustomObject
|
||
Returns a custom object for each user with administrative roles that includes the following properties: RoleName, UserName, UserPrincipalName, UserId, HybridUser, and Licenses.</li></ul>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-heading'>
|
||
<h3 class='panel-title'> Note </h3>
|
||
</div>
|
||
<div class='panel-body'>Creation Date: 2024-04-15
|
||
Purpose/Change: Initial function development to support Microsoft 365 administrative role auditing.</div>
|
||
</div>
|
||
<div>
|
||
<h3> Examples </h3>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-body'>
|
||
<strong>EXAMPLE 1</strong>
|
||
<pre class="brush: ps">Get-AdminRoleUserLicense</pre>
|
||
<div>This example retrieves all administrative role users along with their licenses by connecting to Microsoft Graph using the default scopes.</div>
|
||
<strong>EXAMPLE 2</strong>
|
||
<pre class="brush: ps">Get-AdminRoleUserLicense -SkipGraphConnection</pre>
|
||
<div>This example retrieves all administrative role users along with their licenses without attempting to connect to Microsoft Graph, assuming that the connection is already established.</div>
|
||
</div>
|
||
</div>
|
||
<p class='pull-right'><a onclick='document.body.scrollTop = document.documentElement.scrollTop = 0;' style='cursor: pointer;'>Top of page</a>
|
||
<div>
|
||
<h3> Links </h3>
|
||
<div>
|
||
<ul>
|
||
<li class=''><a href='https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-AdminRoleUserLicense' target='_blank'>https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-AdminRoleUserLicense</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="Invoke-M365SecurityAudit" class="toggle_container">
|
||
<div class="page-header">
|
||
<h2> Invoke-M365SecurityAudit </h2>
|
||
<p>Invokes a security audit for Microsoft 365 environments.</p>
|
||
<p>The Invoke-M365SecurityAudit cmdlet performs a comprehensive security audit based on the specified parameters. It allows auditing of various configurations and settings within a Microsoft 365 environment, such as compliance with CIS benchmarks.</p>
|
||
</div>
|
||
<div>
|
||
<h3> Syntax </h3>
|
||
</div>
|
||
<div class="panel panel-default">
|
||
<div class='panel-body'>
|
||
<pre class="brush: ps">Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -ELevel <String> -ProfileLevel <String> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -IncludeIG1 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -IncludeIG2 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -IncludeIG3 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -IncludeRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||
|
||
Invoke-M365SecurityAudit -TenantAdminUrl <String> [-M365DomainForPWPolicyTest <String>] -SkipRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-WhatIf] [-Confirm] [<CommonParameters>]</pre>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h3> Parameters </h3>
|
||
<table class="table table-striped table-bordered table-condensed visible-on">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th class="visible-lg visible-md">Alias</th>
|
||
<th>Description</th>
|
||
<th class="visible-lg visible-md">Required?</th>
|
||
<th class="visible-lg">Pipeline Input</th>
|
||
<th class="visible-lg">Default Value</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><nobr>-TenantAdminUrl</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>The URL of the tenant admin. This parameter is mandatory.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-M365DomainForPWPolicyTest</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>The domain name of the Microsoft 365 environment to test. This parameter is not mandatory and by default it will pass/fail all found domains as a group if a specific domain is not specified.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-ELevel</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>Specifies the E-Level (E3 or E5) for the audit. This parameter is optional and can be combined with the ProfileLevel parameter.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-ProfileLevel</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>Specifies the profile level (L1 or L2) for the audit. This parameter is optional and can be combined with the ELevel parameter.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-IncludeIG1</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, includes tests where IG1 is true.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-IncludeIG2</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, includes tests where IG2 is true.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-IncludeIG3</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, includes tests where IG3 is true.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-IncludeRecommendation</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>Specifies specific recommendations to include in the audit. Accepts an array of recommendation numbers.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-SkipRecommendation</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>Specifies specific recommendations to exclude from the audit. Accepts an array of recommendation numbers.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-DoNotConnect</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, the cmdlet will not establish a connection to Microsoft 365 services.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-DoNotDisconnect</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, the cmdlet will not disconnect from Microsoft 365 services after execution.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-NoModuleCheck</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, the cmdlet will not check for the presence of required modules.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-WhatIf</nobr></td>
|
||
<td class="visible-lg visible-md">wi</td>
|
||
<td></td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-Confirm</nobr></td>
|
||
<td class="visible-lg visible-md">cf</td>
|
||
<td></td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h3> Inputs </h3>
|
||
<p>The input type is the type of the objects that you can pipe to the cmdlet.</p>
|
||
<ul><li>None. You cannot pipe objects to Invoke-M365SecurityAudit.</li></ul>
|
||
</div>
|
||
<div>
|
||
<h3> Outputs </h3>
|
||
<p>The output type is the type of the objects that the cmdlet emits.</p>
|
||
<ul><li>CISAuditResult[]
|
||
The cmdlet returns an array of CISAuditResult objects representing the results of the security audit.</li></ul>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-heading'>
|
||
<h3 class='panel-title'> Note </h3>
|
||
</div>
|
||
<div class='panel-body'>- This module is based on CIS benchmarks.
|
||
- Governed by the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||
- Commercial use is not permitted. This module cannot be sold or used for commercial purposes.
|
||
- Modifications and sharing are allowed under the same license.
|
||
- For full license details, visit: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en
|
||
- Register for CIS Benchmarks at: https://www.cisecurity.org/cis-benchmarks</div>
|
||
</div>
|
||
<div>
|
||
<h3> Examples </h3>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-body'>
|
||
<strong>EXAMPLE 1</strong>
|
||
<pre class="brush: ps">Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com" -ELevel "E5" -ProfileLevel "L1"</pre>
|
||
<div>Performs a security audit for the E5 level and L1 profile in the specified Microsoft 365 environment.</div>
|
||
<strong>EXAMPLE 2</strong>
|
||
<pre class="brush: ps">Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com" -IncludeIG1</pre>
|
||
<div>Performs an audit including all tests where IG1 is true.</div>
|
||
<strong>EXAMPLE 3</strong>
|
||
<pre class="brush: ps">Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com" -SkipRecommendation '1.1.3', '2.1.1'</pre>
|
||
<div>Performs an audit while excluding specific recommendations 1.1.3 and 2.1.1.</div>
|
||
<strong>EXAMPLE 4</strong>
|
||
<pre class="brush: ps">$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com"</pre>
|
||
<div>PS> $auditResults | Export-Csv -Path "auditResults.csv" -NoTypeInformation
|
||
|
||
Captures the audit results into a variable and exports them to a CSV file.</div>
|
||
</div>
|
||
</div>
|
||
<p class='pull-right'><a onclick='document.body.scrollTop = document.documentElement.scrollTop = 0;' style='cursor: pointer;'>Top of page</a>
|
||
<div>
|
||
<h3> Links </h3>
|
||
<div>
|
||
<ul>
|
||
<li class=''><a href='https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Invoke-M365SecurityAudit' target='_blank'>https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Invoke-M365SecurityAudit</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="Sync-CISExcelAndCsvData" class="toggle_container">
|
||
<div class="page-header">
|
||
<h2> Sync-CISExcelAndCsvData </h2>
|
||
<p>Synchronizes data between an Excel file and either a CSV file or an output object from Invoke-M365SecurityAudit, and optionally updates the Excel worksheet.</p>
|
||
<p>The Sync-CISExcelAndCsvData function merges data from a specified Excel file with data from either a CSV file or an output object from Invoke-M365SecurityAudit based on a common key. It can also update the Excel worksheet with the merged data. This function is particularly useful for updating Excel records with <br>additional data from a CSV file or audit results while preserving the original formatting and structure of the Excel worksheet.</p>
|
||
</div>
|
||
<div>
|
||
<h3> Syntax </h3>
|
||
</div>
|
||
<div class="panel panel-default">
|
||
<div class='panel-body'>
|
||
<pre class="brush: ps">Sync-CISExcelAndCsvData -ExcelPath <String> -WorksheetName <String> -CsvPath <String> [-SkipUpdate] [<CommonParameters>]
|
||
|
||
Sync-CISExcelAndCsvData -ExcelPath <String> -WorksheetName <String> -AuditResults <CISAuditResult[]> [-SkipUpdate] [<CommonParameters>]</pre>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h3> Parameters </h3>
|
||
<table class="table table-striped table-bordered table-condensed visible-on">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th class="visible-lg visible-md">Alias</th>
|
||
<th>Description</th>
|
||
<th class="visible-lg visible-md">Required?</th>
|
||
<th class="visible-lg">Pipeline Input</th>
|
||
<th class="visible-lg">Default Value</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><nobr>-ExcelPath</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>The path to the Excel file that contains the original data. This parameter is mandatory.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-WorksheetName</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>The name of the worksheet within the Excel file that contains the data to be synchronized. This parameter is mandatory.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-CsvPath</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>The path to the CSV file containing data to be merged with the Excel data. This parameter is mandatory when using the CsvInput parameter set.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-AuditResults</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>An array of CISAuditResult objects from Invoke-M365SecurityAudit to be merged with the Excel data. This parameter is mandatory when using the ObjectInput parameter set.</td>
|
||
<td class="visible-lg visible-md">true</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><nobr>-SkipUpdate</nobr></td>
|
||
<td class="visible-lg visible-md"></td>
|
||
<td>If specified, the function will return the merged data object without updating the Excel worksheet. This is useful for previewing the merged data.</td>
|
||
<td class="visible-lg visible-md">false</td>
|
||
<td class="visible-lg">false</td>
|
||
<td class="visible-lg">False</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h3> Inputs </h3>
|
||
<p>The input type is the type of the objects that you can pipe to the cmdlet.</p>
|
||
<ul><li>None. You cannot pipe objects to Sync-CISExcelAndCsvData.</li></ul>
|
||
</div>
|
||
<div>
|
||
<h3> Outputs </h3>
|
||
<p>The output type is the type of the objects that the cmdlet emits.</p>
|
||
<ul><li>Object[]
|
||
If the SkipUpdate switch is used, the function returns an array of custom objects representing the merged data.</li></ul>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-heading'>
|
||
<h3 class='panel-title'> Note </h3>
|
||
</div>
|
||
<div class='panel-body'>- Ensure that the 'ImportExcel' module is installed and up to date.
|
||
- It is recommended to backup the Excel file before running this script to prevent accidental data loss.
|
||
- This function is part of the CIS Excel and CSV Data Management Toolkit.</div>
|
||
</div>
|
||
<div>
|
||
<h3> Examples </h3>
|
||
</div>
|
||
<div class='panel panel-default'>
|
||
<div class='panel-body'>
|
||
<strong>EXAMPLE 1</strong>
|
||
<pre class="brush: ps">Sync-CISExcelAndCsvData -ExcelPath "path\to\excel.xlsx" -WorksheetName "DataSheet" -CsvPath "path\to\data.csv"</pre>
|
||
<div>Merges data from 'data.csv' into 'excel.xlsx' on the 'DataSheet' worksheet and updates the worksheet with the merged data.</div>
|
||
<strong>EXAMPLE 2</strong>
|
||
<pre class="brush: ps">$mergedData = Sync-CISExcelAndCsvData -ExcelPath "path\to\excel.xlsx" -WorksheetName "DataSheet" -CsvPath "path\to\data.csv" -SkipUpdate</pre>
|
||
<div>Retrieves the merged data object for preview without updating the Excel worksheet.</div>
|
||
<strong>EXAMPLE 3</strong>
|
||
<pre class="brush: ps">$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://tenant-admin.url" -DomainName "example.com"</pre>
|
||
<div>PS> Sync-CISExcelAndCsvData -ExcelPath "path\to\excel.xlsx" -WorksheetName "DataSheet" -AuditResults $auditResults
|
||
Merges data from the audit results into 'excel.xlsx' on the 'DataSheet' worksheet and updates the worksheet with the merged data.</div>
|
||
<strong>EXAMPLE 4</strong>
|
||
<pre class="brush: ps">$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://tenant-admin.url" -DomainName "example.com"</pre>
|
||
<div>PS> $mergedData = Sync-CISExcelAndCsvData -ExcelPath "path\to\excel.xlsx" -WorksheetName "DataSheet" -AuditResults $auditResults -SkipUpdate
|
||
Retrieves the merged data object for preview without updating the Excel worksheet.</div>
|
||
</div>
|
||
</div>
|
||
<p class='pull-right'><a onclick='document.body.scrollTop = document.documentElement.scrollTop = 0;' style='cursor: pointer;'>Top of page</a>
|
||
<div>
|
||
<h3> Links </h3>
|
||
<div>
|
||
<ul>
|
||
<li class=''><a href='https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Sync-CISExcelAndCsvData' target='_blank'>https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Sync-CISExcelAndCsvData</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js" charset="utf-8"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js" charset="utf-8"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPowerShell.min.js" charset="utf-8"></script>
|
||
<script>
|
||
$(document).ready(function() {
|
||
$(".toggle_container").hide();
|
||
var previousId;
|
||
if(location.hash) {
|
||
var id = location.hash.slice(1); //Get rid of the # mark
|
||
var elementToShow = $("#" + id); //Save local reference
|
||
if(elementToShow.length) { //Check if the element exists
|
||
elementToShow.slideToggle('fast'); //Show the element
|
||
elementToShow.addClass("check_list_selected"); //Add class to element (the link)
|
||
}
|
||
previousId = id;
|
||
}
|
||
|
||
$('.nav-menu a, .psLink a').click(function() {
|
||
$(".sidebar-navbar-collapse").collapse('hide');
|
||
$('.toggle_container').hide(); // Hide all
|
||
var elem = $(this).prop("hash");
|
||
$(elem).toggle('fast'); // Show HREF/to/ID one
|
||
history.pushState({}, '', $(this).attr("href"));
|
||
window.scrollTo(0, 0);
|
||
return false;
|
||
});
|
||
SyntaxHighlighter.defaults['toolbar'] = false;
|
||
SyntaxHighlighter.defaults['gutter'] = false;
|
||
SyntaxHighlighter.all();
|
||
|
||
$('#searchList').btsListFilter('#searchinput', {itemChild: 'a', initial: false, resetOnBlur: true});
|
||
|
||
$(document).keyup(function( e ) {
|
||
if(!$('#searchinput').is(':focus') && e.which >= 65 && e.which <= 90 ){
|
||
$('#searchinput').val(String.fromCharCode(e.keyCode));
|
||
$('#searchinput').focus();
|
||
}
|
||
});
|
||
$(document).click(function() {
|
||
$('#searchinput').blur();
|
||
});
|
||
});
|
||
</script>
|
||
<!-- bootstrap-list-filter.min.js - removed as external resource and added as content -->
|
||
<script>
|
||
/*
|
||
* bootstrap-list-filter v0.1.7 - 2015-03-30
|
||
*
|
||
* Copyright 2015 Stefano Cudini
|
||
* stefano.cudini@gmail.com
|
||
* http://labs.easyblog.it/
|
||
*
|
||
* Licensed under the MIT license.
|
||
*
|
||
* Demos:
|
||
* http://labs.easyblog.it/bootstrap-list-filter/
|
||
*
|
||
* Source:
|
||
* git@github.com:stefanocudini/bootstrap-list-filter.git
|
||
*
|
||
*/
|
||
!function(a){a.fn.btsListFilter=function(b,c){function d(a,b){return a.replace(/\{ *([\w_]+) *\}/g,function(a,c){return b[c]||""})}function e(a,b){var c;return b=b||300,function(){var d=this,e=arguments;clearTimeout(c),c=setTimeout(function(){a.apply(d,Array.prototype.slice.call(e))},b)}}var f,g=this,h=a(this),i=a(b),j=h;return c=a.extend({delay:300,minLength:1,initial:!0,eventKey:"keyup",resetOnBlur:!0,sourceData:null,sourceTmpl:'<a class="list-group-item" href="#"><span>{title}</span></a>',sourceNode:function(a){return d(c.sourceTmpl,a)},emptyNode:function(){return'<a class="list-group-item well" href="#"><span>No Results</span></a>'},itemEl:".list-group-item",itemChild:null,itemFilter:function(b,d){d=d&&d.replace(new RegExp("[({[^.$*+?\\]})]","g"),"");var e=a(b).text(),f=c.initial?"^":"",g=new RegExp(f+d,"i");return g.test(e)}},c),i.on(c.eventKey,e(function(){var b=a(this).val();c.itemEl&&(j=h.find(c.itemEl)),c.itemChild&&(j=j.find(c.itemChild));var d=j.filter(function(){return c.itemFilter.call(g,this,b)}),e=j.not(d);c.itemChild&&(d=d.parents(c.itemEl),e=e.parents(c.itemEl).hide()),""!==b&&b.length>=c.minLength?(d.show(),e.hide(),"function"===a.type(c.sourceData)?(d.hide(),e.hide(),f&&(a.isFunction(f.abort)?f.abort():a.isFunction(f.stop)&&f.stop()),f=c.sourceData.call(g,b,function(b){if(f=null,d.hide(),e.hide(),h.find(".bts-dynamic-item").remove(),b&&0!==b.length)for(var i in b)a(c.sourceNode.call(g,b[i])).addClass("bts-dynamic-item").appendTo(h);else a(c.emptyNode.call(g)).addClass("bts-dynamic-item").appendTo(h)})):0===d.length&&a(c.emptyNode.call(g)).addClass("bts-dynamic-item").appendTo(h)):(d.show(),e.show(),h.find(".bts-dynamic-item").remove())},c.delay)),c.resetOnBlur&&i.on("blur",function(){a(this).val("").trigger(c.eventKey)}),h}}(jQuery);
|
||
</script>
|
||
</body>
|
||
</html>
|