source stringclasses 1
value | repo stringclasses 33
values | repo_url stringclasses 33
values | path stringlengths 7 179 | language stringclasses 1
value | license stringclasses 4
values | stars int64 2.27k 53.4k | ref stringclasses 4
values | size_bytes int64 48 259k | text stringlengths 48 259k |
|---|---|---|---|---|---|---|---|---|---|
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWindowsHelloForBusinessGlobalPolicy/MSFT_IntuneWindowsHelloForBusinessGlobalPolicy.psm1 | PowerShell | mit | 2,267 | Dev | 17,786 | Confirm-M365DSCModuleDependency -ModuleName 'MSFT_IntuneWindowsHelloForBusinessGlobalPolicy'
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
#region resource generator code
[Parameter(Mandatory = $true)]
[ValidateSet('Yes')]
... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/DSCResources/MSFT_SPORetentionLabelsSettings/MSFT_SPORetentionLabelsSettings.psm1 | PowerShell | mit | 2,267 | Dev | 12,242 | Confirm-M365DSCModuleDependency -ModuleName 'MSFT_SPORetentionLabelsSettings'
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter(Mandatory = $true)]
[ValidateSet('Yes')]
[System.String]
$IsSingleInstance,
... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Dependencies/Manifest.psd1 | PowerShell | mit | 2,267 | Dev | 4,744 | @{
Dependencies = @(
@{
ModuleName = 'Az.Accounts'
RequiredVersion = '5.0.1'
},
@{
ModuleName = 'Az.ResourceGraph'
RequiredVersion = '1.2.1'
},
@{
ModuleName = 'Az.Resources'
RequiredVersio... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCLogEngine.psm1 | PowerShell | mit | 2,267 | Dev | 24,244 | <#
.Description
This function creates a new error log file for each session, whenever an error
is encountered, and appends valuable troubleshooting information to the file
.Functionality
Internal
#>
function New-M365DSCLogEntry
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[Sys... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCAgent.psm1 | PowerShell | mit | 2,267 | Dev | 7,975 | <#
.Description
This function tests the configuration of the agent
.Example
Test-M365DSCAgent
.Functionality
Public
#>
function Test-M365DSCAgent
{
[CmdletBinding()]
param()
#region Telemetry
$data = [System.Collections.Generic.Dictionary[[String], [String]]]::new()
$data.Add('Event', 'TestAgent'... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCModuleMgmt.psm1 | PowerShell | mit | 2,267 | Dev | 32,806 | $Script:IsPowerShellCore = $PSVersionTable.PSEdition -eq 'Core'
$Script:IsPsResourceGetAvailable = $null -ne (Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable)
$Script:M365DSCDependenciesValidated = $false
if ($null -eq $Script:M365DSCDependencies)
{
$Script:M365DSCDependencies = [System.Collectio... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCDllLoader.psm1 | PowerShell | mit | 2,267 | Dev | 4,946 | <#
.SYNOPSIS
Loads and initializes the Microsoft365DSC C# dll files.
.DESCRIPTION
This module loads all of the Microsoft365DSC.*.dll at module import time.
It provides fail-fast validation of .NET Framework version requirements and
exports initialization status for diagnostics.
.NOTES
The dll load... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCExportUtil.psm1 | PowerShell | mit | 2,267 | Dev | 39,083 | $Script:M365DSCStringReplacementMap = @{}
<#
.Description
This is the main Microsoft365DSC.Reverse function that extracts the DSC configuration from an existing Microsoft 365 Tenant.
.Parameter LaunchWebUI
Adding this parameter will open the WebUI in a browser.
.Parameter Path
Specifies the path in which the exporte... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCConfigurationHelper.psm1 | PowerShell | mit | 2,267 | Dev | 5,346 | <#
.SYNOPSIS
Get the evaluation rules for guarding a given configuration.
.DESCRIPTION
This function will return all the evaluation rules for a given configuration either as a new configuration file or as a list of rules that can be used in a configuration to guard the resources.
.PARAMETER ConfigurationPath
... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 | PowerShell | mit | 2,267 | Dev | 14,759 | Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
function Get-StringFirstCharacterToUpper
{
[CmdletBinding()]
[OutputType([System.String])]
param (
[Parameter(Mandatory = $true)]
[System.String]
$Value
)
return $Value.Substring(0, 1).ToUpper() + $Value.Substring(1,... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCReport.psm1 | PowerShell | mit | 2,267 | Dev | 71,141 | # Automatically initialize accelerator on module import
Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
$Script:ReportCSS = @'
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f8f9fa;
color: #212529;
margin: 0;
padding... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCCompare.psm1 | PowerShell | mit | 2,267 | Dev | 4,494 | <#
.SYNOPSIS
This module contains the comparison logic for M365DSC.
Delegates to the C# ResourceComparer for all type normalization,
primary-key alignment, and drift detection.
#>
Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
$Script:IsPowerShellCore = $PSVersionTable.PSEdition -eq 'Core'
func... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCSchemaHandler.psm1 | PowerShell | mit | 2,267 | Dev | 4,334 | function New-M365DSCSchemaDefinition
{
[CmdletBinding()]
param ()
$schemaFiles = Get-ChildItem -Path '.\Modules\Microsoft365DSC\DSCResources\*.schema.mof' -Recurse
$classInfoList = @()
$classesList = @()
foreach ($file in $schemaFiles)
{
$readMePath = "$($file.DirectoryName)\ReadM... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCIntuneSettingsCatalogUtil.psm1 | PowerShell | mit | 2,267 | Dev | 522 | Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
function Get-SettingsCatalogSettingName
{
[CmdletBinding()]
[OutputType([System.String])]
param (
[Parameter(Mandatory = $true)]
$SettingDefinition,
[Parameter(Mandatory = $true)]
[System.Array]
$AllSettingD... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCErrorHandler.psm1 | PowerShell | mit | 2,267 | Dev | 10,913 | <#
.DESCRIPTION
This function stores the already exported configuration to file, so this
information isn't lost when the export encounters an issue
.FUNCTIONALITY
Internal
#>
function Save-M365DSCPartialExport
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[System.St... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCPermissions.psm1 | PowerShell | mit | 2,267 | Dev | 47,568 | using namespace System.Management.Automation.Language
<#
.Description
This function lists all Graph, SharePoint or Exchange permissions required for the specified
resources, both for reading/updating and Delegated/Applications. With the parameters, you can
specify a specific subset of permissions, to be use with the P... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 | PowerShell | mit | 2,267 | Dev | 69,144 | #region Session Objects
$Global:SessionSecurityCompliance = $null
#endregion
# Automatically initialize accelerator on module import
Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
$Script:M365DSCWorkloads = @('AAD', 'ADO', 'AZURE', 'COMMERCE', 'DEFENDER', 'EXO', 'FABRIC', 'INTUNE', 'O365', 'OD', 'PLANNER',... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 | PowerShell | mit | 2,267 | Dev | 46,874 | <#
.Description
This function orchestrate the export process between Export-M365DSCConfiguration
and the ReverseDSC module.
.Functionality
Internal
#>
function Start-M365DSCConfigurationExtract
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribu... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCIntuneUtil.psm1 | PowerShell | mit | 2,267 | Dev | 52,442 | function ConvertFrom-IntunePolicyAssignment
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable[]])]
param (
[Parameter(Mandatory = $true)]
[Array]
$Assignments,
[Parameter()]
[System.Boolean]
$IncludeDeviceFilter = $true
)
if ($null -eq $S... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCTenantInfo.psm1 | PowerShell | mit | 2,267 | Dev | 8,197 | <#
.DESCRIPTION
This function gets the onmicrosoft.com name of the tenant
.FUNCTIONALITY
Internal
#>
function Get-M365DSCTenantDomain
{
[CmdletBinding(DefaultParameterSetName = 'AppId')]
[OutputType([System.String])]
param
(
[Parameter(ParameterSetName = 'AppId', Mandatory = $true)]
... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCConnection.psm1 | PowerShell | mit | 2,267 | Dev | 14,652 | [hashtable]$Script:M365DSCTelemetryConnectionToGraphParams = @{}
Initialize-M365DSCDllLoader -ErrorAction SilentlyContinue
<#
.DESCRIPTION
This function gets all resources that support the specified authentication method and
determines the most secure authentication method supported by the resource.
.FUNCTIO... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCCheckProperties.psm1 | PowerShell | mit | 2,267 | Dev | 8,111 | <#
.Description
This function checks if properties of existing resources are up to date.
Creates a report about missing or outdated properties of existing resources
and a list of missing resources.
.Functionality
Internal
#>
function Get-PropertyReport
{
param
(
[Parameter(Mandatory = $... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCTelemetryEngine.psm1 | PowerShell | mit | 2,267 | Dev | 25,558 | $Script:TelemetryEnabled = [System.Environment]::GetEnvironmentVariable('M365DSCTelemetryEnabled', `
[System.EnvironmentVariableTarget]::Machine)
<#
.DESCRIPTION
This function tests if telemetry is enabled for M365DSC.
.FUNCTIONALITY
Internal
#>
function Test-IsM365DSCTelemetryEnabled
{
[Cmdle... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/M365DSCDocGenerator.psm1 | PowerShell | mit | 2,267 | Dev | 38,656 | if (-not ([System.Management.Automation.PSTypeName]'WikiExampleBlockType').Type)
{
$typeDefinition = @'
public enum WikiExampleBlockType
{
None,
PSScriptInfo,
Configuration,
ExampleCommentHeader
}
'@
Add-Type -TypeDefinition $typeDefinition
}
<#
.Description
Get-Dsc... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCEmojis.psm1 | PowerShell | mit | 2,267 | Dev | 1,941 | $Global:M365DSCEmojiAccessDenied = [char]::ConvertFromUtf32(0x1F6AB)
$Global:M365DSCEmojiAlert = [char]::ConvertFromUtf32(0x1F514)
$Global:M365DSCEmojiAnnouncement = [char]::ConvertFromUtf32(0x1F4E2)
$Global:M365DSCEmojiClipboard = [char]::ConvertFromUtf32(0x1F4CB)
$Global:M365DSCEmojiCloud = [char]::ConvertFromUtf32(0... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCDefenderHelper.psm1 | PowerShell | mit | 2,267 | Dev | 801 | function Invoke-M365DSCDefenderREST
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[System.Collections.... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCPowerPlatformRESTHelper.psm1 | PowerShell | mit | 2,267 | Dev | 1,112 | function Invoke-M365DSCPowerPlatformRESTWebRequest
{
[OutputType([System.Collections.Hashtable])]
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[Syst... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCFabricHelper.psm1 | PowerShell | mit | 2,267 | Dev | 689 | function Invoke-M365DSCFabricWebRequest
{
[OutputType([System.Collections.Hashtable])]
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[System.Collecti... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCLicensingHelper.psm1 | PowerShell | mit | 2,267 | Dev | 892 | function Invoke-M365DSCLicensingWebRequest
{
[OutputType([System.Collections.Hashtable])]
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[System.Colle... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCAzureDevOPSHelper.psm1 | PowerShell | mit | 2,267 | Dev | 1,010 | function Invoke-M365DSCAzureDevOPSWebRequest
{
[OutputType([System.Collections.Hashtable])]
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[System.Str... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCAzureHelper.psm1 | PowerShell | mit | 2,267 | Dev | 5,308 | function Get-M365DSCAzureBillingAccount
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param()
$uri = "$((Get-MSCloudLoginConnectionProfile -Workload Azure).ManagementUrl)providers/Microsoft.Billing/billingAccounts?api-version=2024-04-01&?includeAll=true"
$response = Invoke-AzRest... |
github | Microsoft365DSC/Microsoft365DSC | https://github.com/Microsoft365DSC/Microsoft365DSC | Modules/Microsoft365DSC/Modules/WorkloadHelpers/M365DSCServicesHubHelper.psm1 | PowerShell | mit | 2,267 | Dev | 1,295 | function Invoke-M365DSCServicesHubWebRequest
{
[OutputType([System.Collections.Hashtable])]
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[System.String]
$Uri,
[Parameter()]
[System.String]
$Method = 'GET',
[Parameter()]
[System.Col... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.