Compare commits

..
9 Commits
Author SHA1 Message Date
Mikael Karlsson ece28a649f 3.8.1 2023-01-26 22:29:21 +11:00
Mikael Karlsson 897309e48e 3.7.4 2022-11-22 21:54:51 +11:00
Mikael Karlsson 2dc5eca089 Merge branch 'master' of https://github.com/Micke-K/IntuneManagement 2022-10-25 20:28:23 +11:00
Mikael Karlsson 02c162efd3 Updated the version 2022-10-25 20:27:22 +11:00
Mikael Karlsson aae21c3960 Update ReleaseNotes.md 2022-10-24 23:41:21 +11:00
Mikael Karlsson 103b1c2e66 3.7.3 2022-10-24 19:19:30 +11:00
Mikael Karlsson d7f2d32771 3.7.2 2022-10-11 20:35:20 +11:00
Mikael Karlsson 9c9e46d315 Merge pull request #86 from cstaubli/master
Find certificate by thumbprint in store
2022-09-04 18:58:41 +10:00
Christian Staubli e980b412d0 Find certificate by thumbprint in store 2022-09-02 11:31:26 +02:00
60 changed files with 9177 additions and 6107 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
RootModule = 'CloudAPIPowerShellManagement.psm1'
# Version number of this module.
ModuleVersion = '3.7.1'
ModuleVersion = '3.8.1'
# Supported PSEditions
# CompatiblePSEditions = @()
+31 -3
View File
@@ -11,7 +11,7 @@ This module handles the WPF UI
function Get-ModuleVersion
{
'3.7.1'
'3.8.1'
}
function Initialize-Window
@@ -415,7 +415,7 @@ function Set-XamlProperty
function Get-XamlProperty
{
param($xamlObj, $controlName, $propertyName, $defaultValue)
param($xamlObj, $controlName, $propertyName, $defaultValue = $null)
$obj = $xamlObj.FindName($controlName)
@@ -423,7 +423,7 @@ function Get-XamlProperty
{
if($obj)
{
return (?? $obj."$propertyName" $null)
return (?? $obj."$propertyName" $defaultValue)
}
else
{
@@ -2666,6 +2666,34 @@ function Show-LogView
}
}
function Get-Base64ScriptContent
{
param($encodeContent, [switch]$RemoveSignature)
if(-not $encodeContent) { return }
try
{
$scriptContent = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($encodeContent))
if($RemoveSignature -eq $true)
{
$x = $scriptContent.IndexOf("# SIG # Begin signature block")
if($x -gt 0)
{
$scriptContent = $scriptContent.SubString(0,$x)
$scriptContent = $scriptContent + "# SIG # Begin signature block`nSignature data excluded..."
}
}
$scriptContent
}
catch
{
}
}
New-Alias -Name ?? -value Invoke-Coalesce
New-Alias -Name ?: -value Invoke-IfTrue
Export-ModuleMember -alias * -function *
+184
View File
@@ -0,0 +1,184 @@
<style type="text/css">
html { }
html,body {
margin:0;
padding:5px;
position:relative;
}
.header-level1 {
font-family:"Arial",sans-serif;
font-size: 18px;
margin-top: 0px;
margin-bottom: 0px;
}
.header-level2 {
font-family:"Arial",sans-serif;
font-size: 16px;
margin-top: 3px;
margin-bottom: 0px;
}
.header-level3 {
font-family:"Arial",sans-serif;
font-size: 14px;
margin-top: 3px;
margin-bottom: 0px;
}
.header-level4 {
font-family:"Arial",sans-serif;
font-size: 12px;
margin-top: 3px;
margin-bottom: 0px;
}
.header-level6 {
font-family:"Arial",sans-serif;
font-size: 10px;
margin-top: 3px;
}
.table-settings {
border: 1px solid #999999;
padding-right: 5px;
font-family:"Arial",sans-serif;
font-size: 11px;
}
.table-settings TR:nth-child(even) {
background-color: #FAFAFA
}
.table-settings th {
background-color: #D0D0D0;
padding: 0px;
text-align:left;
font-size: 12px;
padding-right: 10px;
padding-top: 3px;
font-weight: bold;
border-width: 5px;
padding: 5px;
border-style: none;
border-color: #F2F2F2;
}
.table-settings td {
text-align:left;
padding-right: 5px;
border-width: 5px;
padding: 5px;
border-style: none;
border-color: #F2F2F2;
border-bottom: 1px solid #ddd;
}
.code {
background: #f4f4f4;
border: 1px solid #ddd;
border-left: 3px solid #333333;
color: #666;
page-break-inside: avoid;
font-family: monospace;
font-size: 12px;
line-height: 1.6;
margin-bottom: 2px;
max-width: 100%;
overflow: auto;
padding: 1em 1.5em;
display: block;
word-wrap: break-word;
}
.description summary {
list-style: none;
cursor: pointer;
}
details.description[open] summary::after {
content: attr(data-open);
}
details.description:not([open]) summary::after {
content: attr(data-close);
}
.row-even {
}
.row-odd {
}
.category-level1 {
background-color: #E0E0E0;
font-size: 11px;
font-weight: bold;
}
.category-level2 {
background-color: #E0E0E0;
font-size: 11px;
}
.anchor-style {
font-family:"Arial",sans-serif;
font-size: 11px;
}
.anchor-level2 {
}
.anchor-level3 {
padding-left: 5px;
}
.anchor-level4 {
padding-left: 10px;
}
.anchor-level5 {
padding-left: 15px;
}
.table-value {
border: 0px;
width: 100%;
padding: 0px;
font-family:"Arial",sans-serif;
font-size: 11px;
}
.table-value th {
background-color: #F9F9F9;
padding: 0px;
text-align:left;
font-size: 11px;
padding-right: 0px;
padding-top: 3px;
padding-bottom: 3px;
font-weight: normal;
border-width: 0px;
border-style: none;
}
.table-value tr {
background-color: #FFFFFF;
}
.table-value td {
border-bottom: 0;
padding: 1px;
}
.row-new-property {
background-color: #E7E7E7 !important;
}
</style>
+117
View File
@@ -0,0 +1,117 @@
<style type="text/css">
html { }
html,body {
margin:0;
padding:0 px;
position:relative;
}
h6 {
margin-top: 2px !important;
}
.table-settings {
padding-right: 5px;
font-family:"Arial",sans-serif;
font-size: 11px;
margin-bottom: 0px !important;
}
.table-settings p {
margin-bottom: 0px !important;
}
.table-settings TR:nth-child(even) {
background-color: #FAFAFA
}
.table-settings td {
text-align:left;
border-width: 5px;
padding: 5px !important;
border-style: none;
border-color: #F2F2F2;
border-bottom: 1px solid #ddd;
}
.table-header1 td {
background-color: #D0D0D0;
text-align: left;
font-size: 12px;
font-weight: bold;
border-width: 5px;
padding: 5px;
border-style: none;
border-color: #F2F2F2;
}
.category-level1 {
background-color: #E0E0E0;
font-size: 11px;
font-weight: bold;
}
.category-level2 {
background-color: #E0E0E0;
font-size: 11px;
}
.anchor-style {
font-family:"Arial",sans-serif;
font-size: 11px;
}
.anchor-level2 {
}
.table-value {
border: 0px;
width: 100%;
padding: 0px;
font-family:"Arial",sans-serif;
font-size: 11px;
}
.table-value th {
background-color: #F9F9F9;
padding: 0px;
text-align:left;
font-size: 11px;
padding-right: 0px;
padding-top: 3px;
padding-bottom: 3px;
font-weight: normal;
border-width: 0px;
border-style: none;
}
.table-value tr {
background-color: #FFFFFF;
}
.table-value td {
border-bottom: 0;
padding: 1px;
}
.row-new-property {
background-color: #E7E7E7 !important;
}
.description summary {
list-style: none;
cursor: pointer;
}
details.description[open] summary::after {
content: attr(data-open);
}
details.description:not([open]) summary::after {
content: attr(data-close);
}
</style>
+1 -7
View File
@@ -1014,13 +1014,7 @@
"PolicyTypeLanguageId": "vpn",
"PlatformLanguageId": "Windows10",
"Categories": [
"vpn",
"vpnappsandtrafficrules",
"vpnconditionalaccess",
"vpndnstriggers",
"vpnproxy",
"vpnsplittunneling",
"vpntrustednetwork"
"vpn"
]
},
{
@@ -11,7 +11,7 @@
"entityKey": "configureEmail",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "Inputs.authenticationType",
@@ -19,7 +19,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.AccountType",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"options": [
{
"nameResourceKey": "Inputs.basicAuth",
@@ -37,7 +37,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.EmailUPN",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"options": [
{
"nameResourceKey": "userPrincipalNameOption",
@@ -58,7 +58,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.AccountDomain",
"dataType": 20,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -74,7 +74,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.EmailAddress",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"options": [
{
"nameResourceKey": "userPrincipalNameOption",
@@ -92,7 +92,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.ServerHostName",
"dataType": 20,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -108,7 +108,7 @@
"entityKey": "com.microsoft.outlook.EmailProfile.EmailAccountName",
"dataType": 20,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -124,7 +124,7 @@
"entityKey": "IntuneMAMAllowedAccountsOnly",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -158,7 +158,7 @@
"entityKey": "com.microsoft.outlook.Mail.FocusedInbox",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowBiometricsTitle",
@@ -166,7 +166,7 @@
"entityKey": "com.microsoft.outlook.Auth.Biometric",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowUserChangeTitle",
@@ -176,7 +176,7 @@
"booleanActions": 109,
"unconfiguredValue": true,
"allowMissing": true,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -192,7 +192,7 @@
"entityKey": "com.microsoft.outlook.Contacts.LocalSyncEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowUserChangeTitle",
@@ -202,7 +202,7 @@
"booleanActions": 109,
"unconfiguredValue": true,
"allowMissing": true,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -218,7 +218,7 @@
"entityKey": "com.microsoft.outlook.Mail.officeFeedEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowSmartReplyTitle",
@@ -226,7 +226,7 @@
"entityKey": "com.microsoft.outlook.Mail.SuggestedRepliesEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowUserChangeTitle",
@@ -234,7 +234,7 @@
"entityKey": "com.microsoft.outlook.Mail.SuggestedRepliesEnabled.UserChangeAllowed",
"dataType": 0,
"booleanActions": 109,
"category": 103,
"category": "TableHeaders.settings",
"unconfiguredValue": true,
"allowMissing": true,
"Condition": {
@@ -252,7 +252,7 @@
"entityKey": "com.microsoft.outlook.Mail.ExternalRecipientsToolTipEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowDefaultAppSignatureTitle",
@@ -260,7 +260,7 @@
"entityKey": "com.microsoft.outlook.Mail.DefaultSignatureEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.blockExternalImagesTitle",
@@ -268,7 +268,7 @@
"entityKey": "com.microsoft.outlook.Mail.BlockExternalImagesEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowUserChangeTitle",
@@ -278,7 +278,7 @@
"booleanActions": 109,
"unconfiguredValue": true,
"allowMissing": true,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
@@ -294,7 +294,7 @@
"entityKey": "com.microsoft.outlook.Mail.OrganizeByThreadEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.playMyEmailsTitle",
@@ -302,7 +302,7 @@
"entityKey": "com.microsoft.outlook.Mail.PlayMyEmailsEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.themesEnabledTitle",
@@ -310,7 +310,7 @@
"entityKey": "com.microsoft.outlook.Settings.ThemesEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.textPredictionsTitle",
@@ -318,7 +318,7 @@
"entityKey": "com.microsoft.outlook.Mail.TextPredictionsEnabled",
"dataType": 0,
"booleanActions": 120,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "OutlookAppConfig.allowUserChangeTitle",
@@ -328,7 +328,7 @@
"booleanActions": 109,
"unconfiguredValue": true,
"allowMissing": true,
"category": 103,
"category": "TableHeaders.settings",
"Condition": {
"Expressions": [
{
+105 -1
View File
@@ -7,6 +7,96 @@
"booleanActions": 0,
"category": "AppInformationTab.name"
},
{
"nameResourceKey": "Inputs.packageIdLabel",
"descriptionResourceKey": "",
"entityKey": "packageIdentifier",
"dataType": 20,
"booleanActions": 0,
"category": "AppInformationTab.name",
"Condition": {
"Expressions": [
{
"property": "@OData.Type",
"value": "#microsoft.graph.winGetApp"
}
]
}
},
{
"nameResourceKey": "Inputs.packageIdLabel",
"descriptionResourceKey": "",
"entityKey": "packageIdentifier",
"dataType": 107,
"booleanActions": 0,
"category": "AppInformationTab.name",
"value": "UWP",
"Condition": {
"type": "and",
"Expressions": [
{
"property": "packageIdentifier",
"value": "9*",
"operator": "like"
},
{
"property": "@OData.Type",
"value": "#microsoft.graph.winGetApp"
}
]
}
},
{
"nameResourceKey": "Inputs.packageIdLabel",
"descriptionResourceKey": "",
"entityKey": "packageIdentifier",
"dataType": 107,
"booleanActions": 0,
"category": "AppInformationTab.name",
"value": "Win32",
"Condition": {
"type": "and",
"Expressions": [
{
"property": "packageIdentifier",
"value": "X*",
"operator": "like"
},
{
"property": "@OData.Type",
"value": "#microsoft.graph.winGetApp"
}
]
}
},
{
"nameResourceKey": "Inputs.packageIdLabel",
"descriptionResourceKey": "",
"entityKey": "packageIdentifier",
"dataType": 107,
"booleanActions": 0,
"category": "AppInformationTab.name",
"value": "Unsupported Store Type",
"Condition": {
"type": "and",
"Expressions": [
{
"property": "packageIdentifier",
"value": "9*",
"operator": "notlike"
},
{
"property": "packageIdentifier",
"value": "X*",
"operator": "notlike"
},
{
"property": "@OData.Type",
"value": "#microsoft.graph.winGetApp"
}
]
}
},
{
"nameResourceKey": "Inputs.displayVersionLabel",
"descriptionResourceKey": "",
@@ -836,10 +926,24 @@
]
},
{
"Columns": [
{
"metadata": {
"entityKey": "returnCode",
"nameResourceKey": "Win32ReturnCodes.Columns.returnCode"
}
},
{
"metadata": {
"entityKey": "type",
"nameResourceKey": "Win32ReturnCodes.Columns.codeType"
}
}
],
"nameResourceKey": "Win32ReturnCodes.selectorLabel",
"descriptionResourceKey": "",
"entityKey": "returnCodes",
"dataType": 20,
"dataType": 21,
"booleanActions": 0,
"category": "Win32Program.selectorLabel"
},
+48 -26
View File
@@ -80,7 +80,7 @@
"value": "azureAD"
}
]
}
}
]
},
{
@@ -99,40 +99,62 @@
}
]
}
},
},
{
"nameResourceKey": "Autopilot.OOBE.language",
"descriptionResourceKey": "",
"dataType": 102,
"category": "Autopilot.OOBE.title",
"entityKey": "language",
"booleanActions": 0
},
"booleanActions": 0,
"ChildSettings": [
{
"nameResourceKey": "Autopilot.OOBE.title",
"descriptionResourceKey": "",
"entityKey": "outOfBoxExperienceSettings",
"dataType": 6,
"booleanActions": 0,
"category": "Autopilot.OOBE.title",
"Condition": {
"Expressions": [
{
"property": "language",
"operator": "ne",
"value": "user-select"
}
]
},
"complexOptions": [
{
"nameResourceKey": "Autopilot.OOBE.skipKeyboardSelection",
"descriptionResourceKey": "Autopilot.OOBE.skipKeyboardSelectionInfo",
"entityKey": "skipKeyboardSelectionPage",
"dataType": 0,
"booleanActions": 109,
"category": "Autopilot.OOBE.title",
"Condition": {
"type": "or",
"Expressions": [
{
"property": "isLanguageSet",
"value": true
}
]
}
}
]
}
]
},
{
"nameResourceKey": "Autopilot.OOBE.title",
"descriptionResourceKey": "",
"entityKey": "outOfBoxExperienceSettings",
"dataType": 6,
"skipAddLevel": true,
"booleanActions": 0,
"category": "Autopilot.OOBE.title",
"complexOptions": [
{
"nameResourceKey": "Autopilot.OOBE.skipKeyboardSelection",
"descriptionResourceKey": "Autopilot.OOBE.skipKeyboardSelectionInfo",
"entityKey": "skipKeyboardSelectionPage",
"dataType": 0,
"booleanActions": 109,
"category": "Autopilot.OOBE.title",
"Condition": {
"type": "or",
"Expressions": [
{
"property": "isLanguageSet",
"value": true
}
]
}
},
"complexOptions": [
{
"nameResourceKey": "Autopilot.OOBE.licenseAgreement",
"descriptionResourceKey": "Autopilot.OOBE.licenseAgreementInfo",
@@ -148,7 +170,7 @@
"dataType": 0,
"booleanActions": 108,
"category": "Autopilot.OOBE.title"
},
},
{
"nameResourceKey": "Autopilot.OOBE.hideEscapeLink",
"descriptionResourceKey": "Autopilot.OOBE.hideEscapeLinkInfo",
@@ -174,7 +196,7 @@
"value": "administrator"
}
]
}
}
]
},
{
@@ -184,12 +206,12 @@
"dataType": 0,
"booleanActions": 109,
"category": "Autopilot.OOBE.title"
},
},
{
"nameResourceKey": "Autopilot.OOBE.ApplyComputerNameTemplate.label",
"descriptionResourceKey": "Autopilot.OOBE.ApplyComputerNameTemplate.infoBalloon",
"entityKey": "applyDeviceNameTemplate",
"dataType": 103,
"dataType": 0,
"booleanActions": 109,
"category": "Autopilot.OOBE.title",
"ChildSettings": [
@@ -5,7 +5,7 @@
"entityKey": "versionInfo",
"dataType": 20,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "SoftwareUpdates.IosUpdatePolicy.Settings.Schedule.label",
@@ -13,7 +13,7 @@
"entityKey": "updateScheduleType",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"options": [
{
"nameResourceKey": "SoftwareUpdates.IosUpdatePolicy.Settings.Schedule.outsideActiveHours",
@@ -39,7 +39,7 @@
},
{
"dataType": 16,
"category": 103,
"category": "TableHeaders.settings",
"nameResourceKey": "timeZoneName",
"descriptionResourceKey": "timeZoneDescription",
"childSettings": [
@@ -249,6 +249,6 @@
"entityKey": "timeWidows",
"dataType": 20,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
}
]
@@ -13,7 +13,7 @@
"entityKey": "showInstallationProgress",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.timeout",
@@ -21,7 +21,7 @@
"entityKey": "installProgressTimeoutInMinutes",
"dataType": 14,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.customMessageToggle",
@@ -29,7 +29,7 @@
"entityKey": "showCustomErrorMessage",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.customMessageTextBox",
@@ -37,7 +37,7 @@
"entityKey": "customErrorMessage",
"dataType": 20,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.collectLogToggle",
@@ -45,7 +45,7 @@
"entityKey": "allowLogCollectionOnInstallFailure",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.enableForAutopilotOnlyToggle",
@@ -53,7 +53,7 @@
"entityKey": "trackInstallProgressForAutopilotOnly",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.blockToggle",
@@ -61,7 +61,7 @@
"entityKey": "blockDeviceSetupRetryByUser",
"dataType": 16,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"options": [
{
"nameResourceKey": "SettingDetails.no",
@@ -77,7 +77,7 @@
"entityKey": "allowDeviceResetOnInstallFailure",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.allowToUseToggle",
@@ -85,7 +85,7 @@
"entityKey": "allowDeviceUseOnInstallFailure",
"dataType": 0,
"booleanActions": 109,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "EnrollmentStatusScreen.Apps.useSelectedAppsToggleLabel",
@@ -93,7 +93,7 @@
"entityKey": "waitForApps",
"dataType": 14,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
}
]
}
@@ -13,7 +13,7 @@
"entityKey": "deployableContentDisplayName",
"dataType": 20,
"booleanActions": 0,
"category": 103
"category": "TableHeaders.settings"
},
{
"nameResourceKey": "WindowsQualityUpdateProfile.Details.DaysUntilForcedReboot.label",
@@ -21,13 +21,13 @@
"entityKey": "expeditedUpdateSettings",
"dataType": 6,
"booleanActions": 0,
"category": 103,
"category": "TableHeaders.settings",
"complexOptions": [
{
"nameResourceKey": "WindowsQualityUpdateProfile.Details.DaysUntilForcedReboot.label",
"descriptionResourceKey": "",
"dataType": 16,
"category": 103,
"category": "TableHeaders.settings",
"entityKey": "daysUntilForcedReboot",
"booleanActions": 0,
"options": [
@@ -62,6 +62,34 @@
"booleanActions": 0,
"policyType": 2,
"enabled": true
},
{
"isSettingDescription": false,
"showAsSectionHeader": true,
"dataType": 8,
"category": 3,
"nameResourceKey": "lockScreenMessageName",
"childSettings": [
{
"dataType": 25,
"category": 3,
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 2,
"enabled": true
}
],
"options": [
],
"booleanActions": 0,
"policyType": 2,
"enabled": true
}
],
"options": [
@@ -44,7 +44,7 @@
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
"enabled": false
},
{
"dataType": 16,
@@ -1,815 +0,0 @@
{
"devicefirmwareconfigurationinterface_windows10devicefirmwareconfigurationinterface": [
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "dfciHeaderName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
},
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "securityFeaturesName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "changeUefiSettingsPermissionName",
"descriptionResourceKey": "changeUefiSettingsPermissionDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfiguredOnly",
"value": "notConfiguredOnly",
"enabled": true
},
{
"nameResourceKey": "none",
"value": "none",
"enabled": true
}
],
"entityKey": "changeUefiSettingsPermission",
"booleanActions": 0,
"defaultValue": "notConfiguredOnly",
"unconfiguredValue": "notConfiguredOnly",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "virtualizationOfCpuAndIOName",
"descriptionResourceKey": "virtualizationOfCpuAndIODescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "virtualizationOfCpuAndIO",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "windowsPlatformBinaryTableName",
"descriptionResourceKey": "windowsPlatformBinaryTableDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "windowsPlatformBinaryTable",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "simultaneousMultiThreadingName",
"descriptionResourceKey": "simultaneousMultiThreadingDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "simultaneousMultiThreading",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "builtInHardwareName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
},
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "dfciBuiltinHeaderDescName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "camerasName",
"descriptionResourceKey": "camerasDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "cameras",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "frontCamerasName",
"descriptionResourceKey": "frontCamerasDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "frontCamera",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "rearCamerasName",
"descriptionResourceKey": "rearCamerasDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "rearCamera",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "infraredCamerasName",
"descriptionResourceKey": "infraredCamerasDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "infraredCamera",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "microphonesAndSpeakersName",
"descriptionResourceKey": "microphonesAndSpeakersDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "microphonesAndSpeakers",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "microphonesName",
"descriptionResourceKey": "microphonesDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "microphone",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "radiosName",
"descriptionResourceKey": "radiosDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"children": [
{
"dataType": 10,
"category": 136,
"nameResourceKey": "radioWarningInfoBox",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
}
],
"enabled": true
}
],
"entityKey": "radios",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "bluetoothName",
"descriptionResourceKey": "bluetoothDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "bluetooth",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "wwanName",
"descriptionResourceKey": "wwanDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "wirelessWideAreaNetwork",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "nfcName",
"descriptionResourceKey": "nfcDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "nearFieldCommunication",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "wifiName",
"descriptionResourceKey": "wifiDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "wiFi",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "bootOptionsName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "bootFromExternalMediaName",
"descriptionResourceKey": "bootFromExternalMediaDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "bootFromExternalMedia",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "bootFromBuiltInNetworkAdaptersName",
"descriptionResourceKey": "bootFromBuiltInNetworkAdaptersDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "bootFromBuiltInNetworkAdapters",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": true
},
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 136,
"nameResourceKey": "portName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "usbTypeAPortName",
"descriptionResourceKey": "usbTypeAPortDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "usbTypeAPort",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "usbTypeCPortName",
"descriptionResourceKey": "usbTypeCPortDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "usbTypeCPort",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "sdCardName",
"descriptionResourceKey": "sdCardDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "sdCard",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "wakeOnLANName",
"descriptionResourceKey": "wakeOnLANDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "wakeOnLAN",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
},
{
"dataType": 16,
"category": 136,
"nameResourceKey": "wakeOnPowerName",
"descriptionResourceKey": "wakeOnPowerDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enabledOption",
"value": "enabled",
"enabled": true
},
{
"nameResourceKey": "disabledOption",
"value": "disabled",
"enabled": true
}
],
"entityKey": "wakeOnPower",
"booleanActions": 0,
"defaultValue": "notConfigured",
"unconfiguredValue": "notConfigured",
"policyType": 108,
"enabled": false
}
]
}
@@ -173,6 +173,110 @@
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 16,
"category": 44,
"nameResourceKey": "wiFiPolicyProxySettingsName",
"descriptionResourceKey": "wiFiPolicyProxySettingsDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "noneOption",
"value": "none",
"enabled": true
},
{
"nameResourceKey": "manualOption",
"value": "manual",
"children": [
{
"dataType": 20,
"category": 44,
"nameResourceKey": "proxyServerAddressName",
"descriptionResourceKey": "proxyServerAddressDescription",
"emptyValueResourceKey": "proxyAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyManualAddress",
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 14,
"category": 44,
"nameResourceKey": "portNumberName",
"descriptionResourceKey": "portNumberDescription",
"emptyValueResourceKey": "proxyPortExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyManualPort",
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 12,
"category": 44,
"nameResourceKey": "proxyExclusionListName",
"descriptionResourceKey": "proxyExclusionListDescription",
"emptyValueResourceKey": "proxyExclusionListExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyExclusionList",
"booleanActions": 0,
"policyType": 9,
"enabled": true
}
],
"enabled": true
},
{
"nameResourceKey": "automaticOption",
"value": "automatic",
"children": [
{
"dataType": 20,
"category": 44,
"nameResourceKey": "proxyServerURLName",
"descriptionResourceKey": "proxyServerURLDescription",
"emptyValueResourceKey": "proxyUrlExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyAutomaticConfigurationUrl",
"booleanActions": 0,
"policyType": 9,
"enabled": true
}
],
"enabled": true
}
],
"entityKey": "proxySettings",
"booleanActions": 0,
"defaultValue": "none",
"unconfiguredValue": "noneOption",
"policyType": 9,
"enabled": true
}
],
"enabled": true
@@ -1187,6 +1291,110 @@
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 16,
"category": 44,
"nameResourceKey": "wiFiPolicyProxySettingsName",
"descriptionResourceKey": "wiFiPolicyProxySettingsDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "noneOption",
"value": "none",
"enabled": true
},
{
"nameResourceKey": "manualOption",
"value": "manual",
"children": [
{
"dataType": 20,
"category": 44,
"nameResourceKey": "proxyServerAddressName",
"descriptionResourceKey": "proxyServerAddressDescription",
"emptyValueResourceKey": "proxyAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyManualAddress",
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 14,
"category": 44,
"nameResourceKey": "portNumberName",
"descriptionResourceKey": "portNumberDescription",
"emptyValueResourceKey": "proxyPortExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyManualPort",
"booleanActions": 0,
"policyType": 9,
"enabled": true
},
{
"dataType": 12,
"category": 44,
"nameResourceKey": "proxyExclusionListName",
"descriptionResourceKey": "proxyExclusionListDescription",
"emptyValueResourceKey": "proxyExclusionListExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyExclusionList",
"booleanActions": 0,
"policyType": 9,
"enabled": true
}
],
"enabled": true
},
{
"nameResourceKey": "automaticOption",
"value": "automatic",
"children": [
{
"dataType": 20,
"category": 44,
"nameResourceKey": "proxyServerURLName",
"descriptionResourceKey": "proxyServerURLDescription",
"emptyValueResourceKey": "proxyUrlExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyAutomaticConfigurationUrl",
"booleanActions": 0,
"policyType": 9,
"enabled": true
}
],
"enabled": true
}
],
"entityKey": "proxySettings",
"booleanActions": 0,
"defaultValue": "none",
"unconfiguredValue": "noneOption",
"policyType": 9,
"enabled": true
}
],
"enabled": true
@@ -23,6 +23,23 @@
"defaultValue": true,
"policyType": 2,
"enabled": true
},
{
"dataType": 0,
"category": 45,
"nameResourceKey": "securityCommonCriteriaModeName",
"descriptionResourceKey": "securityCommonCriteriaModeDescription",
"childSettings": [
],
"options": [
],
"entityKey": "securityCommonCriteriaModeEnabled",
"booleanActions": 1,
"defaultValue": false,
"policyType": 2,
"enabled": true
}
],
"options": [
File diff suppressed because it is too large Load Diff
@@ -1,509 +0,0 @@
{
"vpnappsandtrafficrules_windows10vpn": [
{
"dataType": 16,
"category": 124,
"nameResourceKey": "vPNWipOrAppsName",
"descriptionResourceKey": "vPNWipOrAppsDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"value": 0,
"enabled": true
},
{
"nameResourceKey": "wipOption",
"value": 1,
"children": [
{
"dataType": 20,
"category": 124,
"nameResourceKey": "wipName",
"descriptionResourceKey": "wipDescription",
"childSettings": [
],
"options": [
],
"entityKey": "windowsInformationProtectionDomain",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"enabled": true
},
{
"nameResourceKey": "associateAppsOption",
"value": 2,
"children": [
{
"dataType": 19,
"category": 124,
"nameResourceKey": "vPNPolicyOnlyTheseAppsCanUseVPNName",
"descriptionResourceKey": "vPNPolicyOnlyTheseAppsCanUseVPNDescription",
"childSettings": [
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "appIdentifierName",
"descriptionResourceKey": "appIdentifierDescription",
"childSettings": [
],
"options": [
],
"entityKey": "identifier",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 16,
"category": 124,
"nameResourceKey": "eDPPolicyNetworkLocationsListTypeName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "desktopOption",
"value": "desktop",
"enabled": true
},
{
"nameResourceKey": "universalOption",
"value": "universal",
"enabled": true
}
],
"entityKey": "appType",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "vPNPolicyAssociatedAppsName",
"descriptionResourceKey": "vPNPolicyAssociatedAppsDescription",
"childSettings": [
],
"options": [
],
"entityKey": "associatedApps",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
}
],
"options": [
{
"nameResourceKey": "enableOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "disableOption",
"value": false,
"enabled": true
}
],
"entityKey": "onlyAssociatedAppsCanUseConnection",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
}
],
"enabled": true
}
],
"entityKey": "syntheticWipOrApps",
"booleanActions": 0,
"defaultValue": 0,
"unconfiguredValue": 0,
"policyType": 89,
"enabled": true
},
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "ruleName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
],
"entityKey": "name",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 16,
"category": 124,
"nameResourceKey": "trafficRuleRoutingPolicyTypeName",
"descriptionResourceKey": "trafficRuleRoutingPolicyTypeDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "noneOption",
"value": "none",
"enabled": true
},
{
"nameResourceKey": "splitTunnelOption",
"value": "splitTunnel",
"enabled": true
},
{
"nameResourceKey": "forceTunnelOption",
"value": "forceTunnel",
"enabled": true
}
],
"entityKey": "routingPolicyType",
"booleanActions": 0,
"defaultValue": "none",
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 14,
"category": 124,
"nameResourceKey": "protocolsName",
"descriptionResourceKey": "empty",
"childSettings": [
{
"columns": [
{
"metadata": {
"dataType": 14,
"category": 124,
"nameResourceKey": "lowerPortName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyPortExample",
"childSettings": [
],
"options": [
],
"entityKey": "lowerNumber",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 14,
"category": 124,
"nameResourceKey": "upperPortName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyPortExampleUpper",
"childSettings": [
],
"options": [
],
"entityKey": "upperNumber",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "localPortRangesName",
"descriptionResourceKey": "localPortRangesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "localPortRanges",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"columns": [
{
"metadata": {
"dataType": 14,
"category": 124,
"nameResourceKey": "lowerPortName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyPortExample",
"childSettings": [
],
"options": [
],
"entityKey": "lowerNumber",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 14,
"category": 124,
"nameResourceKey": "upperPortName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyPortExampleUpper",
"childSettings": [
],
"options": [
],
"entityKey": "upperNumber",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "remotePortRangesName",
"descriptionResourceKey": "remotePortRangesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "remotePortRanges",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"options": [
],
"entityKey": "protocols",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "trafficRuleAppName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
],
"entityKey": "appId",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 16,
"category": 124,
"nameResourceKey": "trafficRuleAppTypeName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
{
"nameResourceKey": "desktopOption",
"value": "desktop",
"enabled": true
},
{
"nameResourceKey": "universalOption",
"value": "universal",
"enabled": true
}
],
"entityKey": "appType",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "lowerIPv4AddressName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "lowerAddress",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "upperIPv4AddressName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyAddressExampleUpper",
"childSettings": [
],
"options": [
],
"entityKey": "upperAddress",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "localAddressRangesName",
"descriptionResourceKey": "localAddressRangesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "localAddressRanges",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "lowerIPv4AddressName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "lowerAddress",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 124,
"nameResourceKey": "upperIPv4AddressName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyAddressExampleUpper",
"childSettings": [
],
"options": [
],
"entityKey": "upperAddress",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "remoteAddressRangesName",
"descriptionResourceKey": "remoteAddressRangesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "remoteAddressRanges",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 124,
"nameResourceKey": "vPNPolicyNetworkTrafficRulesName",
"descriptionResourceKey": "vPNPolicyNetworkTrafficRulesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "trafficRules",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
}
]
}
@@ -1,116 +0,0 @@
{
"vpnconditionalaccess_windows10vpn": {
"dataType": 19,
"category": 125,
"nameResourceKey": "enableConditionalAccessName",
"descriptionResourceKey": "enableConditionalAccessDescription",
"childSettings": [
{
"dataType": 19,
"category": 125,
"nameResourceKey": "enableSingleSignOnName",
"descriptionResourceKey": "enableSingleSignOnDescription",
"childSettings": [
{
"complexOptions": [
{
"dataType": 20,
"category": 125,
"nameResourceKey": "eDPPolicyAppsListNameName",
"descriptionResourceKey": "eDPPolicyAppsListNameDescription",
"childSettings": [
],
"options": [
],
"entityKey": "name",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"dataType": 20,
"category": 125,
"nameResourceKey": "sCEPPolicyObjectIdentifierColumnName",
"descriptionResourceKey": "sCEPPolicyObjectIdentifierColumnDescription",
"childSettings": [
],
"options": [
],
"entityKey": "objectIdentifier",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"dataType": 6,
"category": 125,
"nameResourceKey": "sCEPPolicyExtendedKeyUsageName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
],
"entityKey": "singleSignOnEku",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"dataType": 20,
"category": 125,
"nameResourceKey": "issuerHashName",
"descriptionResourceKey": "issuerHashDescription",
"childSettings": [
],
"options": [
],
"entityKey": "singleSignOnIssuerHash",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"options": [
{
"nameResourceKey": "enableOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "disableOption",
"value": false,
"enabled": true
}
],
"entityKey": "enableSingleSignOnWithAlternateCertificate",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"options": [
{
"nameResourceKey": "enableOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "disableOption",
"value": false,
"enabled": true
}
],
"entityKey": "enableConditionalAccess",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
@@ -1,438 +0,0 @@
{
"vpndnstriggers_windows10vpn": [
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "vPNPolicyDNSSuffixesName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "dNSSuffixExample",
"childSettings": [
],
"options": [
],
"entityKey": "unusedForSingleItems",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "vPNPolicyDNSSuffixSearchListName",
"descriptionResourceKey": "vPNPolicyDNSSuffixSearchListDescription",
"childSettings": [
],
"options": [
],
"entityKey": "dnsSuffixes",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSName",
"descriptionResourceKey": "dNSNameDescription1809",
"emptyValueResourceKey": "dNSNameExample",
"childSettings": [
],
"options": [
],
"entityKey": "name",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "dNSServerDescription",
"emptyValueResourceKey": "vPNAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "unusedForSingleItems",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "enterOnlyOneForDns",
"childSettings": [
],
"options": [
],
"entityKey": "servers",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "proxy",
"descriptionResourceKey": "vPNProxyDescription1809",
"emptyValueResourceKey": "proxyDNSExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyServerUri",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 19,
"category": 126,
"nameResourceKey": "vPNDnsAutoTriggerName",
"descriptionResourceKey": "vPNDnsAutoTriggerDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "enabledOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "notConfigured",
"value": false,
"enabled": true
}
],
"entityKey": "autoTrigger",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 19,
"category": 126,
"nameResourceKey": "vPNDnsPersistentName",
"descriptionResourceKey": "vPNDnsPersistentDescription",
"childSettings": [
],
"options": [
{
"nameResourceKey": "enabledOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "notConfigured",
"value": false,
"enabled": true
}
],
"entityKey": "persistent",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "vPNPolicyNameResolutionPolicyTableRulesName",
"descriptionResourceKey": "vPNPolicyNameResolutionPolicyTableRulesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "dnsRules",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": true
},
{
"columns": [
{
"metadata": {
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 126,
"nameResourceKey": "vPNPolicyNameResolutionPolicyTableRulesName",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSName",
"descriptionResourceKey": "dNSNameDescription1809",
"emptyValueResourceKey": "dNSNameExample",
"childSettings": [
],
"options": [
],
"entityKey": "name",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 126,
"nameResourceKey": "enterOnlyOneForDns",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "dNSServerDescription",
"emptyValueResourceKey": "vPNAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "unusedForSingleItems",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
],
"entityKey": "servers",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "proxy",
"descriptionResourceKey": "vPNProxyDescription1809",
"emptyValueResourceKey": "proxyDNSExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyServerUri",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "vPNPolicyNameResolutionPolicyTableRulesName",
"descriptionResourceKey": "vPNPolicyNameResolutionPolicyTableRulesDescription",
"childSettings": [
],
"options": [
],
"entityKey": "dnsRules",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": false
},
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSName",
"descriptionResourceKey": "dNSNameDescription",
"emptyValueResourceKey": "dNSNameExample",
"childSettings": [
],
"options": [
],
"entityKey": "name",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 126,
"nameResourceKey": "enterOnlyOneForDns",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "dNSServerDescription",
"emptyValueResourceKey": "vPNAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "unusedForSingleItems",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "dNSServer",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
],
"entityKey": "servers",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 20,
"category": 126,
"nameResourceKey": "proxy",
"emptyValueResourceKey": "proxyDNSExample",
"childSettings": [
],
"options": [
],
"entityKey": "proxyServerUri",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 126,
"nameResourceKey": "vPNPolicyDNSNamesAndServersName",
"descriptionResourceKey": "vPNPolicyDNSNamesAndServersName",
"childSettings": [
],
"options": [
],
"entityKey": "dnsRules",
"booleanActions": 0,
"defaultValue": false,
"policyType": 89,
"enabled": false
}
]
}
@@ -1,119 +0,0 @@
{
"vpnproxy_windows10vpn": [
{
"isSettingDescription": false,
"showAsSectionHeader": false,
"dataType": 8,
"category": 128,
"nameResourceKey": "vPNPolicyUseProxyServerName",
"descriptionResourceKey": "vPNPolicyUseProxyServerDescription",
"childSettings": [
],
"options": [
],
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"complexOptions": [
{
"dataType": 20,
"category": 128,
"nameResourceKey": "vPNPolicyAutomaticConfigurationScriptName",
"descriptionResourceKey": "vPNPolicyAutomaticConfigurationScriptDescription",
"emptyValueResourceKey": "vPNScriptExample",
"childSettings": [
],
"options": [
],
"entityKey": "automaticConfigurationScriptUrl",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"dataType": 20,
"category": 128,
"nameResourceKey": "vPNPolicyAddressName",
"descriptionResourceKey": "vPNPolicyAddressDescription",
"emptyValueResourceKey": "vPNAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "address",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"dataType": 14,
"category": 128,
"nameResourceKey": "vPNPolicyPortNumberName",
"descriptionResourceKey": "empty",
"emptyValueResourceKey": "proxyPortExample",
"childSettings": [
],
"options": [
],
"entityKey": "port",
"booleanActions": 0,
"policyType": 89,
"enabled": true
},
{
"dataType": 16,
"category": 128,
"nameResourceKey": "vPNPolicyBypassProxySettingsForLocalAddressesName",
"descriptionResourceKey": "empty",
"childSettings": [
],
"options": [
{
"nameResourceKey": "notConfigured",
"enabled": true
},
{
"nameResourceKey": "enableOption",
"value": "true",
"enabled": true
},
{
"nameResourceKey": "disableOption",
"value": "false",
"enabled": true
}
],
"entityKey": "bypassProxyServerForLocalAddress",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"dataType": 6,
"category": 128,
"nameResourceKey": "vPNPolicyUseProxyServerName",
"descriptionResourceKey": "vPNPolicyUseProxyServerDescription",
"childSettings": [
],
"options": [
],
"entityKey": "proxyServer",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
]
}
@@ -1,81 +0,0 @@
{
"vpnsplittunneling_windows10vpn": {
"dataType": 19,
"category": 123,
"nameResourceKey": "vPNPolicySendAllNetworkTrafficThroughVPNName",
"descriptionResourceKey": "vPNPolicySendAllNetworkTrafficThroughVPNDescription",
"childSettings": [
{
"columns": [
{
"metadata": {
"dataType": 20,
"category": 123,
"nameResourceKey": "vPNPolicyDestinationPrefixName",
"descriptionResourceKey": "vPNPolicyDestinationPrefixName",
"emptyValueResourceKey": "proxyAddressExample",
"childSettings": [
],
"options": [
],
"entityKey": "destinationPrefix",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
},
{
"metadata": {
"dataType": 14,
"category": 123,
"nameResourceKey": "vPNPolicyPrefixSizeName",
"descriptionResourceKey": "vPNPolicyPrefixSizeName",
"childSettings": [
],
"options": [
],
"entityKey": "prefixSize",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 123,
"nameResourceKey": "vPNPolicyRoutesForThisConnectionName",
"descriptionResourceKey": "vPNPolicyRoutesForThisConnectionDescription",
"childSettings": [
],
"options": [
],
"entityKey": "routes",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
],
"options": [
{
"nameResourceKey": "enableOption",
"value": true,
"enabled": true
},
{
"nameResourceKey": "disableOption",
"value": false,
"enabled": true
}
],
"entityKey": "enableSplitTunneling",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
@@ -1,39 +0,0 @@
{
"vpntrustednetwork_windows10vpn": {
"columns": [
{
"metadata": {
"dataType": 20,
"category": 129,
"nameResourceKey": "vPNPolicyTrustedNetworkDomainColumnName",
"descriptionResourceKey": "",
"emptyValueResourceKey": "VPNPolicyTrustedNetworkDomainExample",
"childSettings": [
],
"options": [
],
"entityKey": "trustedNetworkDomains",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
],
"dataType": 21,
"category": 129,
"nameResourceKey": "vPNPolicyTrustedNetworkDomainName",
"descriptionResourceKey": "vPNPolicyTrustedNetworkDomainDescription",
"childSettings": [
],
"options": [
],
"entityKey": "trustedNetworkDomains",
"booleanActions": 0,
"policyType": 89,
"enabled": true
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -11,7 +11,7 @@ Objects can be compared based on Properties or Documentatation info.
function Get-ModuleVersion
{
'1.0.9'
'1.0.10'
}
function Invoke-InitializeModule
@@ -422,8 +422,8 @@ function Invoke-BulkCompareNamedObjects
Write-Log "Compare $($item.ObjectType.Title) objects"
Write-Log "----------------------------------------------------------------"
$graphObjects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
[array]$graphObjects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
$nameProp = ?? $item.ObjectType.NameProperty "displayName"
foreach($graphObj in ($graphObjects | Where { $_.Object."$($nameProp)" -imatch [regex]::Escape($sourcePattern) }))
@@ -561,7 +561,7 @@ function Start-BulkCompareExportObjects
{
Save-Setting "" "LastUsedFullPath" $folder
$graphObjects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
[array]$graphObjects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
foreach ($fileObj in @(Get-GraphFileObjects $folder -ObjectType $item.ObjectType))
{
+2 -2
View File
@@ -1,6 +1,6 @@
function Get-ModuleVersion
{
'1.0.1'
'1.0.2'
}
function Invoke-InitializeModule
@@ -106,7 +106,7 @@ function Start-BulkCopyObjects
Write-Log "Copy $($item.ObjectType.Title) objects"
Write-Log "----------------------------------------------------------------"
$graphObjects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
[array]$graphObjects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
$nameProp = ?? $item.ObjectType.NameProperty "displayName"
File diff suppressed because it is too large Load Diff
+122 -8
View File
@@ -10,7 +10,7 @@ This module will also document some objects based on PowerShell functions
function Get-ModuleVersion
{
'1.4.0'
'1.5.0'
}
function Invoke-InitializeModule
@@ -27,6 +27,7 @@ function Invoke-InitializeModule
PostAddValue = { Invoke-CDDocumentCustomPostAdd @args }
ObjectDocumented = { Invoke-CDDocumentCustomObjectDocumented @args }
TranslateSectionFile = { Invoke-CDDocumentTranslateSectionFile @args }
PostSettingsCatalog = { Invoke-CDDocumentPostSettingsCatalog @args }
})
}
@@ -150,11 +151,16 @@ function Invoke-CDDocumentObject
}
elseif($type -eq '#microsoft.graph.deviceComplianceScript')
{
Invoke-CDDocumentdeviceComplianceScript $documentationObj
Invoke-CDDocumentDeviceComplianceScript $documentationObj
return [PSCustomObject]@{
Properties = @("Name","Value","Category","SubCategory")
}
}
}
elseif($type -eq '#microsoft.graph.roleScopeTag')
{
Invoke-CDDocumentScopeTag $documentationObj
return $true
}
}
function Get-CDAllManagedApps
@@ -810,7 +816,13 @@ function Add-CDDocumentCustomProfileProperty
$obj.outOfBoxExperienceSettings | Add-Member Noteproperty -Name "azureADJoinType" -Value $joinType
$obj.outOfBoxExperienceSettings | Add-Member Noteproperty -Name "isLanguageSet" -Value (?: ([String]::IsNullOrEmpty($obj.language)) $false $true)
$obj.outOfBoxExperienceSettings | Add-Member Noteproperty -Name "isLanguageSet" -Value (?: ([String]::IsNullOrEmpty($obj.language)) $false $true)
if([String]::IsNullOrEmpty($obj.language))
{
$obj.language = "user-select"
}
$retValue = $true
}
elseif($obj.'@OData.Type' -eq "#microsoft.graph.officeSuiteApp")
@@ -1188,7 +1200,11 @@ function Add-CDDocumentCustomProfileProperty
$returnCodes = @()
foreach($rc in $obj.returnCodes)
{
$returnCodes += ("{0} {1}" -f @($rc.returnCode,(Get-LanguageString "Win32ReturnCodes.CodeTypes.$($rc.type)")))
$returnCodes += [PSCustomObject]@{
returnCode = $rc.returnCode
type = (Get-LanguageString "Win32ReturnCodes.CodeTypes.$($rc.type)")
}
#$returnCodes += ("{0} {1}" -f @($rc.returnCode,(Get-LanguageString "Win32ReturnCodes.CodeTypes.$($rc.type)")))
}
$dependencyApps = @()
@@ -1226,6 +1242,7 @@ function Add-CDDocumentCustomProfileProperty
{
$lngId = "script"
$textValue = $rule.displayName
Add-ObjectScript $rule.displayName ("{0} - {1}" -f @($obj.displayName, "Requirement script")) $rule.ScriptContent
}
$requirementRulesSummary += ("{0} {1}" -f @((Get-LanguageString "Win32Requirements.AdditionalRequirements.RequirementTypeOptions.$lngId"),$textValue))
}
@@ -1233,6 +1250,11 @@ function Add-CDDocumentCustomProfileProperty
if(($obj.detectionRules | Where '@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptDetection"))
{
$detectionRulesType = Get-LanguageString "DetectionRules.RuleConfigurationOptions.customScript"
foreach($rule in $obj.detectionRules)
{
$header = (Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label")
Add-ObjectScript $header ("{0} - {1}" -f @($obj.displayName,$header)) $rule.ScriptContent
}
}
else
{
@@ -1257,12 +1279,13 @@ function Add-CDDocumentCustomProfileProperty
$detectionRulesSummary += ("{0} {1}" -f @((Get-LanguageString "DetectionRules.Manual.RuleTypeOptions.$lngId"),$textValue))
}
}
$obj | Add-Member Noteproperty -Name "requirementRulesSummary" -Value ($requirementRulesSummary -join $objSeparator) -Force
$obj | Add-Member Noteproperty -Name "detectionRulesSummary" -Value ($detectionRulesSummary -join $objSeparator) -Force
$obj | Add-Member Noteproperty -Name "dependencyApps" -Value ($dependencyApps -join $objSeparator) -Force
$obj | Add-Member Noteproperty -Name "supersededApps" -Value ($supersededApps -join $objSeparator) -Force
$obj | Add-Member Noteproperty -Name "detectionRulesType" -Value $detectionRulesType -Force
$obj | Add-Member Noteproperty -Name "returnCodes" -Value ($returnCodes -join $objSeparator) -Force
$obj | Add-Member Noteproperty -Name "returnCodes" -Value $returnCodes -Force
$obj | Add-Member Noteproperty -Name "win10Release" -Value (Get-LanguageString "MinimumOperatingSystem.Windows.V10Release.release$($obj.minimumSupportedWindowsRelease)") -Force
}
elseif($obj.'@OData.Type' -eq "#microsoft.graph.deviceHealthScript")
@@ -1274,12 +1297,29 @@ function Add-CDDocumentCustomProfileProperty
if($obj.detectionScriptContent)
{
$obj | Add-Member Noteproperty -Name "detectionScriptContentString" -Value ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(($obj.detectionScriptContent))))
$header = Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label"
Add-ObjectScript $header ("{1} - {0}" -f $obj.displayName,$header) $obj.detectionScriptContent
}
if($obj.remediationScriptContent)
{
$obj | Add-Member Noteproperty -Name "remediationScriptContentString" -Value ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(($obj.remediationScriptContent))))
$header = Get-LanguageString "ProactiveRemediations.Create.Settings.RemediationScriptMultiLineTextBox.label"
Add-ObjectScript $header ("{1} - {0}" -f $obj.displayName,$header) $obj.remediationScriptContent
}
}
elseif($obj.'@OData.Type' -eq "#microsoft.graph.deviceManagementScript")
{
if($obj.ScriptContent)
{
Add-ObjectScript $obj.FileName ("{1} - {0}" -f $obj.displayName,(Get-LanguageString "WindowsManagement.powerShellScriptObjectName")) $obj.ScriptContent
}
}
elseif($obj.'@OData.Type' -eq "#microsoft.graph.deviceShellScript")
{
if($obj.ScriptContent)
{
Add-ObjectScript $obj.FileName ("{1} - {0}" -f $obj.displayName,(Get-LanguageString "WindowsManagement.shellScriptObjectName")) $rule.ScriptContent
}
}
elseif($obj.'@OData.Type' -eq "#microsoft.graph.windows10TeamGeneralConfiguration")
{
@@ -1313,6 +1353,13 @@ function Add-CDDocumentCustomProfileProperty
$obj | Add-Member Noteproperty -Name "hasForceRestart" -Value $true
}
}
elseif($obj.'@OData.Type' -like "#microsoft.graph.windowsWifiConfiguration")
{
if($obj.wifiSecurityType -eq "wpa2Personal")
{
$obj.preSharedKey = "********"
}
}
if(($obj.PSObject.Properties | where Name -eq "securityRequireSafetyNetAttestationBasicIntegrity") -and
($obj.PSObject.Properties | where Name -eq "securityRequireSafetyNetAttestationCertifiedDevice"))
@@ -1332,6 +1379,7 @@ function Add-CDDocumentCustomProfileProperty
$retValue = $true
}
if(($obj.PSObject.Properties | Where Name -eq "periodOfflineBeforeWipeIsEnforced"))
{
#Conditional Launch settings for AppProtection policies
@@ -3851,7 +3899,7 @@ function Invoke-CDDocumentTranslateSectionFile
#endregion
#region
function Invoke-CDDocumentdeviceComplianceScript
function Invoke-CDDocumentDeviceComplianceScript
{
param($documentationObj)
@@ -3914,4 +3962,70 @@ function Invoke-CDDocumentdeviceComplianceScript
SubCategory = $null
})
}
#endregion
#region Settings Catalog
function Invoke-CDDocumentPostSettingsCatalog
{
param($obj, $objectType, $settingsData)
if($obj.templateReference.TemplateId.StartsWith("19c8aa67-f286-4861-9aa0-f23541d31680"))
{
$reusableSettingsType = Get-GraphObjectType "ReusableSettings"
if($reusableSettingsType)
{
foreach($setting in ($settingsData | Where SettingId -eq "vendor_msft_firewall_mdmstore_firewallrules_{firewallrulename}_remoteaddressdynamickeywords"))
{
$reusableSettings = Invoke-GraphRequest -Url "$($reusableSettingsType.API)/$($setting.RawValue)"
if($reusableSettings.displayName)
{
$setting.Value = $reusableSettings.displayName
}
else
{
Write-Log "No Reusable Settings object found with ID $($setting.RawValue)" 2
}
}
}
}
}
#endregion
#region Scope Tags
function Invoke-CDDocumentScopeTag
{
param($obj, $objectType)
$script:objectSeparator = ?? $global:cbDocumentationObjectSeparator.SelectedValue ([System.Environment]::NewLine)
$script:propertySeparator = ?? $global:cbDocumentationPropertySeparator.SelectedValue ","
$groupIDs, $groupInfo, $filterIds,$filtersInfo = Get-ObjectAssignments $obj.Object
$nameLabel = Get-LanguageString "Inputs.displayNameLabel"
$descriptionLabel = Get-LanguageString "TableHeaders.description"
$assignmentsLabel = Get-LanguageString "TableHeaders.assignments"
$scopeTagInfo = Get-TableObjects $obj.ObjectType
if(-not $scopeTagInfo)
{
$scopeTagInfo = [PSCustomObject]@{
TypeName = (Get-LanguageString "SettingDetails.scopeTags")
ObjectType = $obj.ObjectType
Properties = @($nameLabel, "id", $descriptionLable, $assignmentsLabel)
Items = @()
}
Set-TableObjects $scopeTagInfo
}
$scopeTagInfo.Items += ([PSCustomObject]@{
$nameLabel = $obj.displayName
ID = $obj.Id
$descriptionLabel = $obj.Description
$assignmentsLabel = ($groupInfo.displayName -join $script:objectSeparator)
Object = $documentationObj.Object
})
}
#endregion
+657
View File
@@ -0,0 +1,657 @@
function Get-ModuleVersion
{
'1.0.0'
}
function Invoke-InitializeModule
{
Add-OutputType ([PSCustomObject]@{
Name="HTML"
Value="html"
OutputOptions = (Add-HTMLOptionsControl)
#Activate = { Invoke-HTMLActivate @args }
PreProcess = { Invoke-HTMLPreProcessItems @args }
NewObjectGroup = { Invoke-HTMLNewObjectGroup2 @args }
NewObjectType = { Invoke-HTMLNewObjectType2 @args }
Process = { Invoke-HTMLProcessItem @args }
PostProcess = { Invoke-HTMLPostProcessItems @args }
ProcessAllObjects = { Invoke-HTMLProcessAllObjects @args }
})
}
function Add-HTMLOptionsControl
{
$script:htmlForm = Get-XamlObject ($global:AppRootFolder + "\Xaml\DocumentationHTMLOptions.xaml") -AddVariables
Set-XamlProperty $script:htmlForm "cbHTMLDocumentOutputFile" "ItemsSource" ("[ { Name: `"Single file`",Value: `"Full`" }, { Name: `"One file per object`",Value: `"Object`" }]" | ConvertFrom-Json)
Set-XamlProperty $script:htmlForm "cbHTMLDocumentOutputFile" "SelectedValue" (Get-Setting "Documentation" "HTMLDocumentFileType" "Full")
Set-XamlProperty $script:htmlForm "chkHTMLOpenDocument" "IsChecked" (Get-Setting "Documentation" "HTMLOpenFile" $true)
Set-XamlProperty $script:htmlForm "txtHTMLDocumentName" "Text" (Get-Setting "Documentation" "HTMLDocumentName" "")
Set-XamlProperty $script:htmlForm "txtHTMLCSSFile" "Text" (Get-Setting "Documentation" "HTMLCSSFile" "")
Add-XamlEvent $script:htmlForm "browseHTMLDocumentName" "add_click" {
$sf = [System.Windows.Forms.SaveFileDialog]::new()
$sf.DefaultExt = "*.html"
$sf.Filter = "HTML (*.html)|*.html|All files (*.*)|*.*"
if($sf.ShowDialog() -eq "OK")
{
Set-XamlProperty $script:htmlForm "txtHTMLDocumentName" "Text" $sf.FileName
Save-Setting "Documentation" "HTMLDocumentName" $sf.FileName
}
}
Add-XamlEvent $script:htmlForm "browseHTMLCSSFile" "add_click" {
$of = [System.Windows.Forms.OpenFileDialog]::new()
$of.Multiselect = $false
$of.Filter = "CSS Files (*.css)|*.css|All files (*.*)|*.*"
if($of.ShowDialog())
{
Set-XamlProperty $script:htmlForm "txtHTMLCSSFile" "Text" $of.FileName
Save-Setting "Documentation" "HTMLCSSFile" $of.FileName
}
}
$script:htmlForm
}
function Invoke-HTMLPreProcessItems
{
$script:sectionAnchors = @()
$script:totAnchors = @()
$script:htmlStrings = $null
$script:currentItemFileName = $null
Save-Setting "Documentation" "HTMLDocumentName" (Get-XamlProperty $script:htmlForm "txtHTMLDocumentName" "Text" "")
Save-Setting "Documentation" "HTMLCSSFile" (Get-XamlProperty $script:htmlForm "txtHTMLCSSFile" "Text" "")
Save-Setting "Documentation" "HTMLOpenFile" (Get-XamlProperty $script:htmlForm "chkHTMLOpenDocument" "IsChecked")
Save-Setting "Documentation" "HTMLDocumentFileType" (Get-XamlProperty $script:htmlForm "cbHTMLDocumentOutputFile" "SelectedValue" '')
$defaultCSSFile = $global:AppRootFolder + "\Documentation\DefaultHTMLStyle.css"
$HTMLCssFile = Get-XamlProperty $script:htmlForm "txtHTMLCSSFile" "Text" $defaultCSSFile
if(-not $HTMLCssFile)
{
Write-Log "CSS file not specified. Using default" 2
$HTMLCssFile = $defaultCSSFile
}
elseif([IO.File]::Exists($HTMLCssFile) -eq -$false)
{
Write-Log "CSS file $($HTMLCssFile) not found. Using default" 2
$HTMLCssFile = $defaultCSSFile
}
$cssStyle = ""
if([IO.File]::Exists($HTMLCssFile))
{
Write-Log "Using CSS file $($HTMLCssFile)"
$cssStyle = ((Get-Content -Raw -Path $HTMLCssFile) + [System.Environment]::NewLine)
}
else
{
Write-Log "CSS file $($HTMLCssFile) not found. No styles applied" 2
}
$script:cssStyle = $cssStyle
$fileName = Expand-FileName (Get-XamlProperty $script:htmlForm "txtHTMLDocumentName" "Text" "%MyDocuments%\%Organization%-%Date%.html")
$script:outFile = $fileName
$script:documentPath = [io.path]::GetDirectoryName($fileName)
$script:outputType = (Get-XamlProperty $script:htmlForm "cbHTMLDocumentOutputFile" "SelectedValue" "Full")
if($script:outputType -eq "Object")
{
Write-Log "Document one file for each object + index file"
}
else
{
Write-Log "Document one single file for all objects"
$script:outputType = "Full"
$script:htmlStrings = [System.Text.StringBuilder]::new()
}
}
function Invoke-HTMLPostProcessItems
{
$userName = $global:me.displayName
if($global:me.givenName -and $global:me.surname)
{
$userName = ($global:me.givenName + " " + $global:me.surname)
}
$script:htmlContent = [System.Text.StringBuilder]::new()
$script:htmlContent.AppendLine("<HTML>")
$script:htmlContent.AppendLine($script:cssStyle)
$script:htmlContent.AppendLine("<H1 class='header-level1'>$((?? $script:htmlDocTitle "Intune documentation"))</H1>")
$mail = ""
if($global:me.mail)
{
$mail = " ($($global:me.mail))"
}
$script:htmlContent.AppendLine("Organization: $($global:Organization.displayName)<br />")
$script:htmlContent.AppendLine("Generated by: $userName$mail<br />")
$script:htmlContent.AppendLine("Generated: $((Get-Date).ToShortDateString()) $((Get-Date).ToLongTimeString())<br />")
if($script:sectionAnchors.Count -gt 0)
{
$script:htmlContent.AppendLine("<br />")
$script:htmlContent.AppendLine("<H2 class='header-level2'>Table of Contents</H2>")
}
$tocMaxLevel = 4
foreach($header in $script:sectionAnchors)
{
if($tocMaxLevel -gt 0 -and $header.Level -gt $tocMaxLevel)
{
continue
}
$script:htmlContent.AppendLine("<a href='$($header.FileName)#$($header.Anchor)' class='anchor-style anchor-level$($header.Level)'>$($header.Name)</a><br />")
}
if($script:sectionAnchors.Count -gt 0)
{
$script:htmlContent.AppendLine("<br />")
}
$htmlText = $script:htmlContent.ToString()
if($script:outputType -eq "Full")
{
$htmlText += $script:htmlStrings.ToString()
}
$htmlText += "</HTML>"
Save-DocumentationFile $htmlText $script:outFile -OpenFile:((Get-Setting "Documentation" "HTMLOpenFile" $true) -eq $true)
}
function Invoke-HTMLNewObjectGroup
{
param($obj, $documentedObj)
$script:objectHeaderLevel = 2
$objectTypeString = Get-ObjectTypeString $obj.Object $obj.ObjectType
Add-HTMLHeader (?? $objectTypeString $obj.ObjectType.Title)
}
function Invoke-HTMLNewObjectType
{
param($obj, $documentedObj, [int]$groupCategoryCount = 0)
$script:objectHeaderLevel = 3
if($obj.ObjectType.GroupId -eq "EndpointSecurity")
{
$objectTypeString = $obj.CategoryName
}
else
{
$objectTypeString = $obj.ObjectType.Title
}
Add-HTMLHeader (?? $objectTypeString $obj.ObjectType.Title)
$script:objectHeaderLevel = 4
}
function Invoke-HTMLNewObjectGroup2
{
param($groupId)
$script:objectHeaderLevel = 2
$objectTypeString = Get-ObjectTypeString -ObjectType $groupId
Add-HTMLHeader (?? $objectTypeString $obj.ObjectType.Title)
}
function Invoke-HTMLNewObjectType2
{
param($objectTypeName)
$script:objectHeaderLevel = 3
Add-HTMLHeader $objectTypeName
$script:objectHeaderLevel = 4
}
function Add-HTMLHeader
{
param ($headerText, [int]$level = $script:objectHeaderLevel, [switch]$ToT, [switch]$SkipTOC)
if($script:htmlStrings)
{
$prefix = ""
if($ToT -eq $true)
{
$prefix = "Table $(($script:totAnchors.Count + 1)). "
}
if($ToT -eq $true)
{
$sectionAnchor = "table-$(($script:totAnchors.Count + 1))"
}
else
{
$sectionAnchor = "section-$(($script:sectionAnchors.Count + 1))"
}
$script:htmlStrings.AppendLine("<H$($level) id=`"$prefix$($sectionAnchor)`" class='header-level$($level)'>$headerText</H$($level)>")
$FileName = $script:currentItemFileName
}
else
{
$sectionAnchor = $null
$FileName = $null
}
if($ToT -eq $true)
{
$script:totAnchors += [PSCustomObject]@{
Name = $headerText
Anchor = $sectionAnchor
Level = $level
FileName = $FileName
}
}
elseif($SkipTOC -ne $true)
{
$script:sectionAnchors += [PSCustomObject]@{
Name = $headerText
Anchor = $sectionAnchor
Level = $level
FileName = $FileName
}
}
}
function Invoke-HTMLProcessItem
{
param($obj, $objectType, $documentedObj)
if(!$documentedObj -or !$obj -or !$objectType) { return }
$objName = Get-GraphObjectName $obj $objectType
if($script:outputType -eq "Object")
{
$script:totAnchors = @()
$script:htmlStrings = [System.Text.StringBuilder]::new()
$script:currentItemFileName = (Remove-InvalidFileNameChars "$($objName).html")
}
Add-HTMLHeader $objName
$script:htmlStrings.AppendLine("<br />")
try
{
foreach($tableType in @("BasicInfo","FilteredSettings"))
{
if($tableType -eq "BasicInfo")
{
$properties = @("Name","Value")
}
elseif($global:txtHTMLDocumentationProperties.SelectedValue -eq 'extended' -and $documentedObj.DisplayProperties)
{
$properties = @("Name","Value","Description")
}
elseif($global:txtHTMLDocumentationProperties.SelectedValue -eq 'custom' -and $global:txtHTMLCustomProperties.Text)
{
$properties = @()
foreach($prop in $global:txtHTMLCustomProperties.Text.Split(","))
{
# This will add language support for custom columens (or replacing existing header)
$propInfo = $prop.Split('=')
if(($propInfo | measure).Count -gt 1)
{
$properties += $propInfo[0]
Set-DocColumnHeaderLanguageId $propInfo[0] $propInfo[1]
}
else
{
$properties += $prop
}
}
}
else
{
$properties = (?? $documentedObj.DefaultDocumentationProperties (@("Name","Value")))
}
$lngId = ?: ($tableType -eq "BasicInfo") "SettingDetails.basics" "TableHeaders.settings" -AddCategories
Add-HTMLTableItems $obj $objectType ($documentedObj.$tableType) $properties $lngId -AddCategories -AddSubcategories
}
if(($documentedObj.ComplianceActions | measure).Count -gt 0)
{
$properties = @("Action","Schedule","MessageTemplate","EmailCC")
Add-HTMLTableItems $obj $objectType $documentedObj.ComplianceActions $properties "Category.complianceActionsLabel"
}
if(($documentedObj.ApplicabilityRules | measure).Count -gt 0)
{
$properties = @("Rule","Property","Value")
Add-HTMLTableItems $obj $objectType $documentedObj.ApplicabilityRules $properties "SettingDetails.applicabilityRules"
}
Add-HTMLObjectSettings $obj $objectType $documentedObj
if(($documentedObj.Assignments | measure).Count -gt 0)
{
if($documentedObj.Assignments[0].RawIntent)
{
$properties = @("GroupMode","Group","Filter","FilterMode")
$settingsObj = $documentedObj.Assignments | Where { $_.Settings -ne $null } | Select -First 1
if($settingsObj)
{
foreach($objProp in $settingsObj.Settings.Keys)
{
if($objProp -in $properties) { continue }
if($objProp -in @("Category","RawIntent")) { continue }
$properties += ("Settings." + $objProp)
}
}
}
else
{
$isFilterAssignment = $false
foreach($assignment in $documentedObj.Assignments)
{
if(($assignment.target.PSObject.Properties | Where Name -eq "deviceAndAppManagementAssignmentFilterType"))
{
$isFilterAssignment = $true
break
}
}
$properties = @("Group")
if($isFilterAssignment)
{
$properties += @("Filter","FilterMode")
}
}
Add-HTMLTableItems $obj $objectType $documentedObj.Assignments $properties "TableHeaders.assignments" -AddCategories
}
}
catch
{
Write-LogError "Failed to process object $objName" $_.Exception
}
if($script:outputType -eq "Object")
{
$script:htmlContent = [System.Text.StringBuilder]::new()
$script:htmlContent.AppendLine("<HTML>")
$script:htmlContent.AppendLine($script:cssStyle)
$htmlText = $script:htmlContent.ToString()
$htmlText += $script:htmlStrings.ToString()
$htmlText += "</HTML>"
$fileName = "$($script:documentPath)\$($script:currentItemFileName)"
Save-DocumentationFile $htmlText $fileName
$script:htmlStrings = $null
}
}
function Add-HTMLTableItems
{
param($obj, $objectType, $items, $properties, $lngId, [switch]$AddCategories, [switch]$AddSubcategories, $captionOverride)
if($captionOverride)
{
$caption = $captionOverride
}
elseif($lngId)
{
$caption = "$((Get-LanguageString $lngId)) - $((Get-GraphObjectName $obj $objectType))"
}
else
{
$caption = "$((Get-GraphObjectName $obj $objectType)) ($($objectType.Title))"
}
$tableText = [System.Text.StringBuilder]::new()
$tableText.AppendLine("<table class='table-settings'>")
# Add Header row
$tableText.AppendLine("<tr>")
$columnCount = 0
foreach($prop in $properties)
{
$tableText.AppendLine("<th>$((Invoke-DocTranslateColumnHeader $prop.Split(".")[-1]))</th>")
$columnCount++
}
$tableText.AppendLine("</tr>")
$curCategory = ""
$curSubCategory = ""
$columnCategory = $null
$columnSubCategory = $null
$row = 1
foreach($itemObj in $items)
{
$newCategory = $false
$newSubCategory = $false
$additionalRowClass = ""
if($itemObj.Category -and $curCategory -ne $itemObj.Category -and $AddCategories -eq $true)
{
# Add Category row
$tableText.AppendLine("<tr>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`" class='category-level1'>$($itemObj.Category)</td>")
$tableText.AppendLine("</tr>")
$curCategory = $itemObj.Category
$curSubCategory = ""
$row = 1
$newCategory = $true
$curentPropertyIndex = 0
}
if($itemObj.SubCategory -and $curSubCategory -ne $itemObj.SubCategory -and $AddSubcategories -eq $true)
{
# Add Sub-category row
$tableText.AppendLine("<tr>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`" class='category-level2'>$($itemObj.SubCategory)</td>")
$tableText.AppendLine("</tr>")
$curSubCategory = $itemObj.SubCategory
$row = 1
$newSubCategory = $true
$curentPropertyIndex = 0
}
if($itemObj.PropertyIndex -is [int] -and $itemObj.PropertyIndex -gt 0 -and $itemObj.PropertyIndex -eq 1)
{
$curentPropertyIndex = $itemObj.PropertyIndex
$additionalRowClass = "row-new-property"
}
try
{
if(($row % 2) -eq 1)
{
$rowClass = "row-odd"
}
else
{
$rowClass = "row-even"
}
$row++
$tableText.AppendLine("<tr class='$($rowClass) $($additionalRowClass)'>")
$curCol = 1
foreach($prop in $properties)
{
try
{
$propArr = $prop.Split('.')
$tmpObj = $itemObj
$propName = $propArr[-1]
for($x = 0; $x -lt ($propArr.Count - 1);$x++)
{
$tmpObj = $tmpObj."$($propArr[$x])"
}
if($propName -eq "Value" -and ($itemObj.FullValueTable | measure).Count -gt 0)
{
$tableText.AppendLine("<td><table class='table-value'>")
$tableText.AppendLine("<tr>")
foreach($tableObjectProp in $itemObj.FullValueTable[0].PSObject.Properties)
{
$tableText.AppendLine("<th>$($tableObjectProp.Name)</th>")
}
$tableText.AppendLine("</tr>")
foreach($tableValue in $itemObj.FullValueTable)
{
$tableText.AppendLine("<tr>")
foreach($tableObjectProp in $itemObj.FullValueTable[0].PSObject.Properties)
{
$tableText.AppendLine("<td>$($tableValue."$($tableObjectProp.Name)")</td>")
}
$tableText.AppendLine("</tr>")
}
$tableText.AppendLine("</table></td>")
}
else
{
$style = ""
if($curCol -eq 1 -and $itemObj.Level)
{
try
{
$level = [int]$itemObj.Level
$style = " style='padding-left:$((5 + ($level * 5)))px;'"
}
catch{}
}
$tableText.AppendLine("<td class='property-column$($curCol)'$style>$((Set-HTMLText $tmpObj.$propName))</td>")
}
}
catch
{
Write-LogError "Failed to add property value for $prop" $_.Exception
}
$curCol++
}
}
catch
{
Write-Log "Failed to process property" 2
}
finally
{
$tableText.AppendLine("</tr>")
}
}
$tableText.AppendLine("</table>")
$script:htmlStrings.Append($tableText.ToString())
Add-HTMLHeader $caption -level 6
}
function Invoke-HTMLProcessAllObjects
{
param($documentationInfo)
$scopeTagInfo = Get-TableObjects "ScopeTags"
if($allObjectTypeObjdocumentationInfoects.ObjectType.Id -eq "ScopeTags")
{
if(($documentationInfo.Items | measure).Count -gt 0)
{
Add-HTMLHeader $documentationInfo.TypeName
Add-HTMLTableItems $null $documentationInfo.ObjectType $documentationInfo.Items -captionOverride (Get-LanguageString "SettingDetails.scopeTags")
}
}
}
function Set-HTMLText
{
param([string]$text, [switch]$NoCodeBlock)
if(-not $text)
{
return
}
$txtSummary = ""
if($text -and $text.Length -gt 250)
{
$summaryMax = 40
# Show the first row or the first $max characters if first row is too short or too long
$idx = $text.IndexOfAny(@("`r","`n"))
if($idx -gt 10 -and $idx -lt 50)
{
$summaryMax = $idx
}
$txtSummary = $text.SubString(0,$summaryMax)
}
$code = $false
if($NoCodeBlock -ne $true)
{
$trimText = $text.Trim()
if($trimText.StartsWith("<") -and $trimText.EndsWith(">"))
{
$code = $true
$text = "<pre class='code'>$($text.Replace('&', '&amp;').Replace('<', '&lt;').Replace('>', '&gt;').Replace('"', '&quot;'))</pre>"
if($txtSummary)
{
$txtSummary = $txtSummary.Replace('&', '&amp;').Replace('<', '&lt;').Replace('>', '&gt;').Replace('"', '&quot;')
}
}
}
if($code -eq $false)
{
$text = $text.Replace("`r`n", "<br />")
$text = $text.Replace("`n", "<br />")
$text = $text.Replace('&', '&amp;')
}
if($txtSummary)
{
"<details class='description'><summary data-open='Minimize' data-close='$($txtSummary)...expand'></summary>$text</details>"
}
else
{
$text
}
}
function Add-HTMLObjectSettings
{
param($obj, $objectType, $documentedObj)
foreach($objectScript in $documentedObj.Scripts)
{
if(-not $objectScript.ScriptContent -or -not $objectScript.Caption) { continue }
$script:htmlStrings.AppendLine("<pre class='code'>")
$script:htmlStrings.AppendLine($objectScript.ScriptContent)
$script:htmlStrings.AppendLine("</pre>")
Add-HTMLHeader $objectScript.Caption -Level 6 -SkipTOC
}
}
+311 -128
View File
@@ -1,34 +1,127 @@
function Get-ModuleVersion
{
'1.0.0'
'1.1.0'
}
function Invoke-InitializeModule
{
Add-OutputType ([PSCustomObject]@{
Name="Markdown (Experimental)"
Name="Markdown"
Value="md"
#OutputOptions = (Add-MDOptionsControl)
OutputOptions = (Add-MDOptionsControl)
#Activate = { Invoke-MDActivate @args }
PreProcess = { Invoke-MDPreProcessItems @args }
NewObjectGroup = { Invoke-MDNewObjectGroup @args }
NewObjectGroup = { Invoke-MDNewObjectGroup2 @args }
NewObjectType = { Invoke-MDNewObjectType2 @args }
Process = { Invoke-MDProcessItem @args }
PostProcess = { Invoke-MDPostProcessItems @args }
ProcessAllObjects = { Invoke-MDProcessAllObjects @args }
})
}
function Add-MDOptionsControl
{
$script:mdForm = Get-XamlObject ($global:AppRootFolder + "\Xaml\DocumentationMDOptions.xaml") -AddVariables
Set-XamlProperty $script:mdForm "txtMDDocumentName" "Text" (Get-Setting "Documentation" "MDDocumentName" "")
Set-XamlProperty $script:mdForm "txtMDCSSFile" "Text" (Get-Setting "Documentation" "MDCSSFile" "")
Set-XamlProperty $script:mdForm "chkMDIncludeCSS" "IsChecked" (Get-Setting "Documentation" "MDIncludeCSS" $true)
Set-XamlProperty $script:mdForm "chkMDOpenDocument" "IsChecked" (Get-Setting "Documentation" "MDOpenFile" $true)
Set-XamlProperty $script:mdForm "cbMDDocumentOutputFile" "ItemsSource" ("[ { Name: `"Single file`",Value: `"Full`" }, { Name: `"One file per object`",Value: `"Object`" }]" | ConvertFrom-Json)
Set-XamlProperty $script:mdForm "cbMDDocumentOutputFile" "SelectedValue" (Get-Setting "Documentation" "MDDocumentFileType" "Full")
Add-XamlEvent $script:mdForm "browseMDDocumentName" "add_click" {
$sf = [System.Windows.Forms.SaveFileDialog]::new()
$sf.DefaultExt = "*.md"
$sf.Filter = "MD (*.md)|*.md|All files (*.*)|*.*"
if($sf.ShowDialog() -eq "OK")
{
Set-XamlProperty $script:MDForm "txtMDDocumentName" "Text" $sf.FileName
Save-Setting "Documentation" "MDDocumentName" $sf.FileName
}
}
Add-XamlEvent $script:mdForm "browseMDCSSFile" "add_click" {
$of = [System.Windows.Forms.OpenFileDialog]::new()
$of.Multiselect = $false
$of.Filter = "CSS Files (*.css)|*.css|All files (*.*)|*.*"
if($of.ShowDialog())
{
Set-XamlProperty $script:mdForm "txtMDCSSFile" "Text" $of.FileName
Save-Setting "Documentation" "txtMDCSSFile" $of.FileName
}
}
$script:mdForm
}
function Invoke-MDProcessAllObjects
{
param($allObjectTypeObjects, $objectType)
}
function Invoke-MDPreProcessItems
{
$script:mdStrings = [System.Text.StringBuilder]::new()
$script:sectionAnchors = @()
$script:totAnchors = @()
$script:mdStrings = $null
$script:currentItemFileName = $null
Save-Setting "Documentation" "MDDocumentName" (Get-XamlProperty $script:mdForm "txtMDDocumentName" "Text" "")
Save-Setting "Documentation" "MDIncludeCSS" (Get-XamlProperty $script:mdForm "chkMDIncludeCSS" "IsChecked")
Save-Setting "Documentation" "MDCSSFile" (Get-XamlProperty $script:mdForm "txtMDCSSFile" "Text" "")
Save-Setting "Documentation" "MDOpenFile" (Get-XamlProperty $script:mdForm "chkMDOpenDocument" "IsChecked")
Save-Setting "Documentation" "MDDocumentFileType" (Get-XamlProperty $script:mdForm "cbMDDocumentOutputFile" "SelectedValue" '')
$defaultCSSFile = $global:AppRootFolder + "\Documentation\DefaultMDStyle.css"
$MDCssFile = Get-XamlProperty $script:mdForm "txtMDCSSFile" "Text" $defaultCSSFile
if(-not $MDCssFile)
{
Write-Log "CSS file not specified. Using default" 2
$MDCssFile = $defaultCSSFile
}
elseif([IO.File]::Exists($MDCssFile) -eq -$false)
{
Write-Log "CSS file $($MDCssFile) not found. Using default" 2
$MDCssFile = $defaultCSSFile
}
$cssStyle = ""
if([IO.File]::Exists($MDCssFile))
{
Write-Log "Using CSS file $($MDCssFile)"
$cssStyle = Get-Content -Raw -Path $MDCssFile
$cssStyle += [System.Environment]::NewLine
}
else
{
Write-Log "CSS file $($MDCssFile) not found. No styles applied" 2
}
$script:cssStyle = $cssStyle
$fileName = Expand-FileName (Get-XamlProperty $script:mdForm "txtMDDocumentName" "Text" "%MyDocuments%\%Organization%-%Date%.md")
$script:outFile = $fileName
$script:documentPath = [io.path]::GetDirectoryName($fileName)
$script:outputType = (Get-XamlProperty $script:mdForm "cbMDDocumentOutputFile" "SelectedValue" "Full")
if($script:outputType -eq "Object")
{
Write-Log "Document one file for each object + index file"
}
else
{
Write-Log "Document one single file for all objects"
$script:outputType = "Full"
$script:mdStrings = [System.Text.StringBuilder]::new()
}
}
function Invoke-MDPostProcessItems
{
$userName = $global:me.displayName
if($global:me.givenName -and $global:me.surname)
{
@@ -59,24 +152,38 @@ function Invoke-MDPostProcessItems
foreach($header in $script:sectionAnchors)
{
$script:mdContent.AppendLine("[$($header.Name)](#$($header.Anchor))`n")
$indent = [String]::new(" ", (($header.Level - 1) * 2))
$script:mdContent.AppendLine("$($indent)- [$($header.Name)]($($header.FileName)#$($header.Anchor))`n")
}
$mdText = $script:cssStyle
$script:mdContent.AppendLine("")
$mdText = $script:mdContent.ToString()
$mdText += $script:mdStrings.ToString()
$mdText += $script:mdContent.ToString()
if($script:outputType -eq "Full")
{
$mdText += $script:mdStrings.ToString()
}
$fileName = Expand-FileName "%MyDocuments%\%Organization%-%Date%.md"
Save-DocumentationFile $mdText $script:outFile -OpenFile:((Get-Setting "Documentation" "MDOpenFile" $true) -eq $true)
<#
$fileName = Expand-FileName (Get-XamlProperty $script:mdForm "txtMDDocumentName" "Text" "%MyDocuments%\%Organization%-%Date%.md")
try
{
$mdText | Out-File -FilePath $fileName -Force -Encoding utf8 -ErrorAction Stop
Write-Log "Markdown document $fileName saved successfully"
if((Get-Setting "Documentation" "MDOpenFile" $true) -eq $true)
{
Invoke-Item $fileName
}
}
catch
{
Write-LogError "Failed to save Markdown file" $_.Exception
Write-LogError "Failed to save Markdown file: $fileName." $_.Exception
}
#>
}
function Invoke-MDNewObjectGroup
@@ -86,7 +193,39 @@ function Invoke-MDNewObjectGroup
$objectTypeString = Get-ObjectTypeString $obj.Object $obj.ObjectType
Add-MDHeader "$((?? $objectTypeString $obj.ObjectType.Title))" -Level 1 -USEHtml
}
function Invoke-MDNewObjectType
{
param($obj, $documentedObj, [int]$groupCategoryCount = 0)
if($obj.ObjectType.GroupId -eq "EndpointSecurity")
{
$objectTypeString = $obj.CategoryName
}
else
{
$objectTypeString = $obj.ObjectType.Title
}
Add-MDHeader "$((?? $objectTypeString $obj.ObjectType.Title))" -Level 2 -USEHtml
}
function Invoke-MDNewObjectGroup2
{
param($groupId)
$objectTypeString = Get-ObjectTypeString -ObjectType $groupId
Add-MDHeader $objectTypeString -Level 1 -USEHtml
}
function Invoke-MDNewObjectType2
{
param($objectTypeName)
Add-MDHeader $objectTypeName -Level 2 -USEHtml
}
function Invoke-MDProcessItem
@@ -97,7 +236,14 @@ function Invoke-MDProcessItem
$objName = Get-GraphObjectName $obj $objectType
Add-MDHeader $objName -Level 2 -USEHtml
if($script:outputType -eq "Object")
{
$script:totAnchors = @()
$script:mdStrings = [System.Text.StringBuilder]::new()
$script:currentItemFileName = "./$((Remove-InvalidFileNameChars "$($objName).md").Replace(" ","_"))"
}
Add-MDHeader $objName -Level 3 -USEHtml
$script:mdStrings.AppendLine("")
@@ -164,7 +310,6 @@ function Invoke-MDProcessItem
if(($documentedObj.Assignments | measure).Count -gt 0)
{
$params = @{}
if($documentedObj.Assignments[0].RawIntent)
{
$properties = @("GroupMode","Group","Filter","FilterMode")
@@ -197,15 +342,26 @@ function Invoke-MDProcessItem
{
$properties += @("Filter","FilterMode")
}
$params.Add("AddCategories", $true)
}
Add-MDTableItems $obj $objectType $documentedObj.Assignments $properties "TableHeaders.assignments" @params
Add-MDTableItems $obj $objectType $documentedObj.Assignments $properties "TableHeaders.assignments" -AddCategories
}
}
catch
{
Write-LogError "Failed to process object $objName" $_.Exception
}
if($script:outputType -eq "Object")
{
$script:mdContent = [System.Text.StringBuilder]::new()
$script:mdContent.AppendLine($script:cssStyle)
$mdText = $script:mdContent.ToString()
$mdText += $script:mdStrings.ToString()
$fileName = "$($script:documentPath)\$($script:currentItemFileName)"
Save-DocumentationFile $mdText $fileName
$script:mdStrings = $null
}
}
@@ -227,24 +383,17 @@ function Add-MDTableItems
}
$tableText = [System.Text.StringBuilder]::new()
$tableText.AppendLine("<table>")
$tableText.AppendLine("<tr>")
$columnHeaders = "|"
$columnChars = "|"
$tableText.AppendLine("<table class='table-settings'>")
$tableText.AppendLine("<tr class='table-header1'>")
$columnCount = 0
foreach($prop in $properties)
{
$tableText.AppendLine("<td> $($prop.Split(".")[-1]) </td>")
$tableText.AppendLine("<td>$((Invoke-DocTranslateColumnHeader $prop.Split(".")[-1]))</td>")
$columnCount++
$columnHeaders += ((Invoke-DocTranslateColumnHeader ($prop.Split(".")[-1])) + "|")
$columnChars += "----|"
}
$tableText.AppendLine("</tr>")
#Add-MDText $columnHeaders
#Add-MDText $columnChars
$curCategory = ""
$curSubCategory = ""
@@ -253,34 +402,39 @@ function Add-MDTableItems
foreach($itemObj in $items)
{
$additionalRowClass = ""
if($itemObj.Category -and $curCategory -ne $itemObj.Category -and $AddCategories -eq $true)
{
$tableText.AppendLine("<tr>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`">`n`n**$((Set-MDText $itemObj.Category))**`n`n</td>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`" class='category-level1'>$((Set-MDText $itemObj.Category))</td>")
$tableText.AppendLine("</tr>")
#$columnCategory = "|**" + (Set-MDText $itemObj.Category) + "**|"
#Add-MDText $columnCategory
$curCategory = $itemObj.Category
$curSubCategory = ""
$curentPropertyIndex = 0
}
if($itemObj.SubCategory -and $curSubCategory -ne $itemObj.SubCategory -and $AddSubcategories -eq $true)
{
$tableText.AppendLine("<tr>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`">`n`n***$((Set-MDText $itemObj.SubCategory))***`n`n</td>")
$tableText.AppendLine("<td colspan=`"$($columnCount)`" class='category-level2'>$((Set-MDText $itemObj.SubCategory))</td>")
$tableText.AppendLine("</tr>")
#$columnSubCategory = "|***" + (Set-MDText $itemObj.SubCategory) + "***|"
#Add-MDText $columnSubCategory
$curSubCategory = $itemObj.SubCategory
$curentPropertyIndex = 0
}
if($itemObj.PropertyIndex -is [int] -and $itemObj.PropertyIndex -gt 0 -and $itemObj.PropertyIndex -eq 1)
{
$curentPropertyIndex = $itemObj.PropertyIndex
$additionalRowClass = "row-new-property"
}
#$columnData = "|"
try
{
$tableText.AppendLine("<tr>")
$tableText.AppendLine("<tr class='$($additionalRowClass)'>")
$curCol = 1
foreach($prop in $properties)
{
try
@@ -293,7 +447,49 @@ function Add-MDTableItems
{
$tmpObj = $tmpObj."$($propArr[$x])"
}
$tableText.AppendLine("<td>$((Set-MDText "$($tmpObj.$propName)" -CodeBlock))</td>")
if($propName -eq "Value" -and ($itemObj.FullValueTable | measure).Count -gt 0)
{
$tableText.AppendLine("<td><table class='table-value'>")
$tableText.AppendLine("<tr>")
foreach($tableObjectProp in $itemObj.FullValueTable[0].PSObject.Properties)
{
$tableText.AppendLine("<td class='table-header1'>$($tableObjectProp.Name)</td>")
}
$tableText.AppendLine("</tr>")
foreach($tableValue in $itemObj.FullValueTable)
{
$tableText.AppendLine("<tr>")
foreach($tableObjectProp in $itemObj.FullValueTable[0].PSObject.Properties)
{
$tableText.AppendLine("<td>$($tableValue."$($tableObjectProp.Name)")</td>")
}
$tableText.AppendLine("</tr>")
}
$tableText.AppendLine("</table></td>")
}
else
{
$style = ""
if($curCol -eq 1 -and $itemObj.Level)
{
try
{
$level = [int]$itemObj.Level
$style = " style='padding-left:$((5 + ($level * 5)))px !important;'"
}
catch{}
}
$params = @{}
if($curCol -gt 0)
{
$params.Add("CodeBlock", $true)
}
$tableText.AppendLine("<td class='property-column$($curCol)'$style>$((Set-MDText $tmpObj.$propName @params))</td>")
}
#$columnData += "$((Set-MDText "$($tmpObj.$propName)"))|"
}
catch
@@ -301,6 +497,7 @@ function Add-MDTableItems
#$columnData += "|"
Write-LogError "Failed to add property value for $prop" $_.Exception
}
$curCol++
}
}
@@ -337,57 +534,93 @@ function Add-MDText
function Set-MDText
{
param($text, [switch]$CodeBlock)
param([string]$text, [switch]$CodeBlock)
if($null -eq $text) { return }
$txtSummary = ""
$textOut = ""
if($text -and $text.Length -gt 250)
{
$summaryMax = 40
# Show the first row or the first $max characters if first row is too short or too long
$idx = $text.IndexOfAny(@("`r","`n"))
if($idx -gt 10 -and $idx -lt 50)
{
$summaryMax = $idx
}
$txtSummary = $text.SubString(0,$summaryMax)
}
if($CodeBlock -eq $true)
{
$trimText = $text.Trim()
if($trimText.StartsWith("<") -and $trimText.EndsWith(">"))
if($trimText.StartsWith("<?xml") -or $trimText.StartsWith("<xml") -or ($trimText.StartsWith("<") -and $trimText.EndsWith(">")))
{
return ([Environment]::NewLine + [Environment]::NewLine + "``````xml" + [Environment]::NewLine + $text + [Environment]::NewLine + "``````" + [Environment]::NewLine + [Environment]::NewLine)
$textOut = ([Environment]::NewLine + [Environment]::NewLine + "``````xml" + [Environment]::NewLine + $text + [Environment]::NewLine + "``````" + [Environment]::NewLine + [Environment]::NewLine)
}
}
if($CodeBlock -eq $false -or -not $textOut)
{
$text = $text.Replace("|", '`|')
$text = $text.Replace("*", '`*')
$text = $text.Replace("$", '`$')
$text = $text.Replace("`r`n", "<br />")
$textOut = $text.Replace("`n", "<br />")
}
$text = $text.Replace("|", '`|')
$text = $text.Replace("*", '`*')
$text = $text.Replace("$", '`$')
$text = $text.Replace("`r`n", "<br />")
$text = $text.Replace("`n", "<br />")
$text
if($txtSummary)
{
"<details class='description'><summary data-open='Minimize' data-close='$($txtSummary)...expand'></summary>$textOut</details>"
}
else
{
$textOut
}
}
function Add-MDHeader
{
param($text, [int]$level = 1, [switch]$AddParagraph, [switch]$UseHTML, [switch]$ToT, [switch]$SkipTOC)
$prefix = ""
if($ToT -eq $true)
{
$prefix = "Table $(($script:totAnchors.Count + 1)). "
}
if($UseHTML -eq $true)
if($script:mdStrings)
{
$prefix = ""
if($ToT -eq $true)
{
$sectionAnchor = "table-$(($script:totAnchors.Count + 1))"
}
else
{
$sectionAnchor = "section-$(($script:sectionAnchors.Count + 1))"
}
$script:mdStrings.AppendLine("<h$level id=`"$prefix$($sectionAnchor)`">$text</h$level>")
}
else
{
# Warnig: Not complete! Use HTML if not working...
$text = "$prefix$text"
$sectionAnchor = $text.ToLower().Replace(" ","-").Replace("[","").Replace("]","")
$prefix = "Table $(($script:totAnchors.Count + 1)). "
}
$mdHeader = [String]::new('#',$level)
$script:mdStrings.AppendLine("$mdHeader $text")
if($UseHTML -eq $true)
{
if($ToT -eq $true)
{
$sectionAnchor = "table-$(($script:totAnchors.Count + 1))"
}
else
{
$sectionAnchor = "section-$(($script:sectionAnchors.Count + 1))"
}
$script:mdStrings.AppendLine("<h$level id=`"$prefix$($sectionAnchor)`">$text</h$level>")
}
else
{
# Warnig: Not complete! Use HTML if not working...
$text = "$prefix$text"
$sectionAnchor = $text.ToLower().Replace(" ","-").Replace("[","").Replace("]","")
$mdHeader = [String]::new('#',$level)
$script:mdStrings.AppendLine("$mdHeader $text")
}
$FileName = $script:currentItemFileName
}
else
{
$sectionAnchor = $null
$FileName = $null
}
if($ToT -eq $true)
@@ -395,6 +628,8 @@ function Add-MDHeader
$script:totAnchors += [PSCustomObject]@{
Name = $text
Anchor = $sectionAnchor
FileName = $FileName
Level = $level
}
}
elseif($SkipTOC -ne $true)
@@ -402,6 +637,8 @@ function Add-MDHeader
$script:sectionAnchors += [PSCustomObject]@{
Name = $text
Anchor = $sectionAnchor
FileName = $FileName
Level = $level
}
}
@@ -415,68 +652,14 @@ function Add-MDHeader
function Add-MDObjectSettings
{
param($obj, $objectType, $documentedObj)
if($obj."@OData.Type" -eq "#microsoft.graph.deviceManagementScript")
foreach($objectScript in $documentedObj.Scripts)
{
if($obj.ScriptContent)
{
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.ScriptContent))
$script:mdStrings.AppendLine("~~~")
$caption = "{1} - {0}" -f $obj.fileName,(Get-LanguageString "WindowsManagement.powerShellScriptObjectName")
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
}
if($obj."@OData.Type" -eq "#microsoft.graph.deviceShellScript")
{
if($obj.ScriptContent)
{
$script:mdStrings.AppendLine("~~~shell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.ScriptContent))
$script:mdStrings.AppendLine("~~~")
if(-not $objectScript.ScriptContent -or -not $objectScript.Caption) { continue }
$caption = "{1} - {0}" -f $obj.fileName,(Get-LanguageString "WindowsManagement.shellScriptObjectName")
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
}
elseif($obj."@OData.Type" -eq "#microsoft.graph.deviceHealthScript")
{
if($obj.detectionScriptContent)
{
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.detectionScriptContent))
$script:mdStrings.AppendLine("~~~")
$caption = Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label"
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
if($obj.remediationScriptContent)
{
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.remediationScriptContent))
$script:mdStrings.AppendLine("~~~")
$caption = Get-LanguageString "ProactiveRemediations.Create.Settings.RemediationScriptMultiLineTextBox.label"
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
}
elseif($obj."@OData.Type" -eq "#microsoft.graph.win32LobApp")
{
foreach($rule in ($obj.requirementRules | Where { $_.'@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptRequirement" } ))
{
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.scriptContent))
$script:mdStrings.AppendLine("~~~")
$caption = "{0} - {1}" -f @($obj.displayName, "Requirement script")
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
foreach($rule in ($obj.detectionRules | Where { $_.'@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptDetection" } ))
{
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine((Get-DocScriptContent $obj.scriptContent))
$script:mdStrings.AppendLine("~~~")
$caption = "{0} - {1}" -f @($obj.displayName,(Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label"))
Add-MDHeader $caption -Level 6 -SkipTOC -AddParagraph
}
$script:mdStrings.AppendLine("~~~powershell")
$script:mdStrings.AppendLine($objectScript.ScriptContent)
$script:mdStrings.AppendLine("~~~")
Add-MDHeader $objectScript.Caption -Level 6 -SkipTOC -AddParagraph
}
}
+53 -105
View File
@@ -3,7 +3,7 @@
#https://docs.microsoft.com/en-us/office/vba/api/overview/word
function Get-ModuleVersion
{
'1.3.0'
'1.5.0'
}
function Invoke-InitializeModule
@@ -76,8 +76,6 @@ function Add-WordOptionsControl
$global:txtWordTitleProperty.Text = Get-Setting "Documentation" "WordTitleProperty" "Intune documentation"
$global:txtWordSubjectProperty.Text = Get-Setting "Documentation" "WordSubjectProperty" "Intune documentation"
$global:chkWordIncludeScripts.IsChecked = ((Get-Setting "Documentation" "WordIncludeScripts" "true") -ne "false")
$global:chkWordExcludeScriptSignature.IsChecked = ((Get-Setting "Documentation" "WordExcludeScriptSignature" "false") -ne "false")
$global:chkWordAttachJsonFile.IsChecked = ((Get-Setting "Documentation" "WordAttatchJsonFile" "false") -ne "false")
$global:txtWordScriptTableStyle.Text = Get-Setting "Documentation" "WordScriptTableStyle" ""
@@ -142,8 +140,6 @@ function Invoke-WordPreProcessItems
Save-Setting "Documentation" "WordTitleProperty" $global:txtWordTitleProperty.Text
Save-Setting "Documentation" "WordSubjectProperty" $global:txtWordSubjectProperty.Text
Save-Setting "Documentation" "WordIncludeScripts" $global:chkWordIncludeScripts.IsChecked
Save-Setting "Documentation" "WordExcludeScriptSignature" $global:chkWordExcludeScriptSignature.IsChecked
Save-Setting "Documentation" "WordAttatchJsonFile" $global:chkWordAttachJsonFile.IsChecked
Save-Setting "Documentation" "WordScriptTableStyle" $global:txtWordScriptTableStyle.Text
@@ -466,35 +462,22 @@ function Set-WordContentControlText
function Invoke-WordNewObjectGroup
{
param($obj, $documentedObj)
param($groupId)
$script:objectHeaderLevel = 2
$objectTypeString = Get-ObjectTypeString -ObjectType $groupId
$objectTypeString = Get-ObjectTypeString $obj.Object $obj.ObjectType
Add-DocText (?? $objectTypeString $obj.ObjectType.Title) $global:txtWordHeader1Style.Text
Add-DocText $objectTypeString $global:txtWordHeader1Style.Text
}
function Invoke-WordNewObjectType
{
param($obj, $documentedObj, [int]$groupCategoryCount = 0)
param($objectTypeName)
if($groupCategoryCount -le 1 -or -not $global:txtWordHeader3Style.Text) { return }
$script:objectHeaderLevel = 2
if($obj.ObjectType.GroupId -eq "EndpointSecurity")
{
$objectTypeString = $obj.CategoryName
}
else
{
$objectTypeString = $obj.ObjectType.Title
}
Add-DocText $objectTypeName (Get-ObjectLevelHeader)
Add-DocText (?? $objectTypeString $obj.ObjectType.Title) (Get-ObjectLevelHeader)
$script:objectHeaderLevel = 3;
$script:objectHeaderLevel = 3
}
function local:Get-ObjectLevelHeader
@@ -610,6 +593,7 @@ function Invoke-WordProcessItem
$settingProps += ("Settings." + $objProp)
}
}
$params.Add("AddCategories", $true)
}
else
{
@@ -649,6 +633,7 @@ function Invoke-WordProcessItem
if($fi.Exists)
{
$script:doc.Application.Selection.InlineShapes.AddOLEObject("",$fi.FullName,$false,$true,"$($env:WinDir)\System32\Notepad.exe",0,$fi.Name)
$script:doc.Application.Selection.TypeParagraph()
try { $fi.Delete() } catch {} # Cleanup
}
}
@@ -666,12 +651,18 @@ function Set-DocTableSettingsItems
$secondColumn = $firstColumn + 1
$script:docTable.Cell(1, $firstColumn).Range.Text = (Invoke-WordTranslateColumnHeader "Settings")
$script:docTable.Cell(1, $firstColumn).Range.Text = (Invoke-DocTranslateColumnHeader "Settings")
$script:docTable.Cell(1, $secondColumn).Range.Text = ""
$row = 2
foreach($itemObj in $items)
{
#if($script:docTable.Rows($row).Cells.Count -eq 1) { $row++;continue } # Category / Sub-category
while($script:docTable.Cell($row,1).Next.RowIndex -gt $row)
{
# Category / Sub-category
$row++;
}
$script:docTable.Cell($row, $firstColumn).Range.Text = ""
$script:docTable.Cell($row, $secondColumn).Range.Text = ""
$script:docTable.Cell($row, $firstColumn).Split($properties.Count,1)
@@ -680,7 +671,7 @@ function Set-DocTableSettingsItems
$cellRow = $row
foreach($settingProp in $properties)
{
$script:docTable.Cell($cellRow, $firstColumn).Range.Text = (Invoke-WordTranslateColumnHeader ($settingProp.Split('.')[-1]))
$script:docTable.Cell($cellRow, $firstColumn).Range.Text = (Invoke-DocTranslateColumnHeader ($settingProp.Split('.')[-1]))
$propArr = $settingProp.Split('.')
$tmpObj = $itemObj
@@ -690,7 +681,7 @@ function Set-DocTableSettingsItems
$tmpObj = $tmpObj."$($propArr[$x])"
}
$script:docTable.Cell($cellRow, $secondColumn).Column.Cells($cellRow).Range.Text = "$($tmpObj.$propName)"
$script:docTable.Cell($cellRow, $secondColumn).Range.Text = "$($tmpObj.$propName)"
$cellRow++
}
@@ -726,6 +717,7 @@ function Invoke-WordProcessAllObjects
$nameLabel = $obj.displayName
ID = $obj.Id
$descriptionLable = $obj.Description
Object = $obj
}
}
@@ -794,10 +786,23 @@ function Add-DocTableItems
$curSubCategory = ""
$row = 2
$curentPropertyIndex = 0
foreach($itemObj in $items)
{
try
{
if(($itemObj.Category -and $curCategory -ne $itemObj.Category -and $AddCategories -eq $true) -or
($itemObj.SubCategory -and $curSubCategory -ne $itemObj.SubCategory -and $AddSubcategories -eq $true))
{
$curentPropertyIndex = 0
}
if($itemObj.PropertyIndex -is [int] -and $itemObj.PropertyIndex -gt 0 -and $itemObj.PropertyIndex -eq 1)
{
$curentPropertyIndex = $itemObj.PropertyIndex
# !!! ToDo: Set style for new property
}
$i = 1
foreach($prop in $properties)
{
@@ -831,9 +836,24 @@ function Add-DocTableItems
}
}
$levelExtra = ""
if($i -eq 1 -and $itemObj.Level)
{
try
{
$level = ([int]$itemObj.Level) # - 1
if($level -lt 0) { $level = 0 }
if($level -gt 0)
{
$levelExtra = [String]::new(" ", ($level * 2)) #Should probably use tab stops instead
}
}
catch{}
}
if($null -ne $propValue)
{
$script:docTable.Cell($row, $i).Range.Text = $propValue
$script:docTable.Cell($row, $i).Range.Text = "$levelExtra$propValue"
}
if($propValueFull -and $global:chkWordDocumentationLimitAttach.IsChecked -eq $true)
@@ -850,7 +870,6 @@ function Add-DocTableItems
$propValueFull | Out-File -LiteralPath $tmpFile -Force
$fi = [IO.FileInfo]$tmpFile
[void]$script:docTable.Cell($row, $i).Range.InlineShapes.AddOLEObject("",$fi.FullName,$false,$true,"$($env:WinDir)\System32\Notepad.exe",0,"Full value")
#$script:doc.Application.Selection.InlineShapes.AddOLEObject("",$fi.FullName,$false,$true,"$($env:WinDir)\System32\Notepad.exe",0,"Full value", $script:docTable.Cell($row, $i).Range)
try { $fi.Delete() } catch {}
}
}
@@ -1041,85 +1060,14 @@ function Set-DocObjectStyle
$styleSet
}
function Add-DocObjectSettings
function Add-DocObjectSettings
{
param($obj, $objectType, $documentedObj)
if($obj."@OData.Type" -eq "#microsoft.graph.deviceManagementScript")
foreach($objectScript in $documentedObj.Scripts)
{
if($obj.ScriptContent -and $global:chkWordIncludeScripts.IsChecked -eq $true)
{
$caption = "{1} - {0}" -f $obj.displayName,(Get-LanguageString "WindowsManagement.powerShellScriptObjectName")
Add-DocTableScript $caption $obj.FileName (Get-DocScriptContent $obj.ScriptContent)
}
}
if($obj."@OData.Type" -eq "#microsoft.graph.deviceShellScript")
{
if($obj.ScriptContent -and $global:chkWordIncludeScripts.IsChecked -eq $true)
{
$caption = "{1} - {0}" -f $obj.displayName,(Get-LanguageString "WindowsManagement.shellScriptObjectName")
Add-DocTableScript $caption $obj.FileName (Get-DocScriptContent $obj.ScriptContent)
}
}
elseif($obj."@OData.Type" -eq "#microsoft.graph.deviceHealthScript")
{
if($obj.detectionScriptContent)
{
$caption = Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label"
$header = "{1} - {0}" -f $obj.displayName,$caption
Add-DocTableScript $header $caption (Get-DocScriptContent $obj.detectionScriptContent)
}
if(-not $objectScript.ScriptContent -or -not $objectScript.Caption) { continue }
if($obj.remediationScriptContent)
{
$caption = Get-LanguageString "ProactiveRemediations.Create.Settings.RemediationScriptMultiLineTextBox.label"
$header = "{1} - {0}" -f $obj.displayName,$caption
Add-DocTableScript $header $caption (Get-DocScriptContent $obj.remediationScriptContent)
}
}
elseif($obj."@OData.Type" -eq "#microsoft.graph.win32LobApp")
{
foreach($rule in ($obj.requirementRules | Where { $_.'@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptRequirement" } ))
{
$caption = "{0} - {1}" -f @($obj.displayName, "Requirement script")
Add-DocTableScript $caption $rule.displayName (Get-DocScriptContent $rule.scriptContent)
}
foreach($rule in ($obj.detectionRules | Where { $_.'@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptDetection" } ))
{
$caption = "{0} - {1}" -f @($obj.displayName,(Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label"))
Add-DocTableScript $caption (Get-LanguageString "ProactiveRemediations.Create.Settings.DetectionScriptMultiLineTextBox.label") (Get-DocScriptContent $rule.scriptContent)
}
}
}
function Get-DocScriptContent
{
param($encodeContent)
if(-not $encodeContent) { return }
try
{
$scriptContent = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($encodeContent))
if($global:chkWordExcludeScriptSignature.IsChecked -eq $true)
{
$x = $scriptContent.IndexOf("# SIG # Begin signature block")
if($x -gt 0)
{
$scriptContent = $scriptContent.SubString(0,$x)
$scriptContent = $scriptContent + "# SIG # Begin signature block`nSignature data excluded..."
}
}
$scriptContent
}
catch
{
}
Add-DocTableScript $objectScript.Caption $objectScript.Header $objectScript.ScriptContent
}
}
+578 -37
View File
@@ -1,5 +1,4 @@
<#
<#
.SYNOPSIS
Module for managing Intune objects
@@ -11,7 +10,7 @@ This module is for the Endpoint Manager/Intune View. It manages Export/Import/Co
#>
function Get-ModuleVersion
{
'3.7.0'
'3.8.1'
}
function Invoke-InitializeModule
@@ -121,7 +120,7 @@ function Invoke-InitializeModule
ViewID = "IntuneGraphAPI"
API = "/identity/conditionalAccess/policies"
Permissons=@("Policy.Read.All","Policy.ReadWrite.ConditionalAccess","Application.Read.All")
Dependencies = @("NamedLocations","Applications","TermsOfUse")
Dependencies = @("NamedLocations","Applications","TermsOfUse","AuthenticationStrengths")
GroupId = "ConditionalAccess"
ImportExtension = { Add-ConditionalAccessImportExtensions @args }
PreImportCommand = { Start-PreImportConditionalAccess @args }
@@ -141,6 +140,7 @@ function Invoke-InitializeModule
API = "/identityGovernance/termsOfUse/agreements"
Permissons=@("Agreement.ReadWrite.All")
PreImportCommand = { Start-PreImportTermsOfUse @args }
PostExportCommand = { Start-PostExportTermsOfUse @args }
GroupId = "ConditionalAccess"
})
}
@@ -166,11 +166,13 @@ function Invoke-InitializeModule
PostListCommand = { Start-PostListEndpointSecurity @args }
PostExportCommand = { Start-PostExportEndpointSecurity @args }
PostFileImportCommand = { Start-PostFileImportEndpointSecurity @args }
PostGetCommand = { Start-PostGetEndpointSecurity @args }
#PreCopyCommand = { Start-PreCopyEndpointSecurity @args }
PostCopyCommand = { Start-PostCopyEndpointSecurity @args }
PreUpdateCommand = { Start-PreUpdateEndpointSecurity @args }
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
GroupId = "EndpointSecurity"
Dependencies = @("ReusableSettings")
GroupId = "EndpointSecurity"
})
Add-ViewItem (New-Object PSObject -Property @{
@@ -254,6 +256,7 @@ function Invoke-InitializeModule
PreReplaceCommand = { Start-PreReplaceEnrollmentRestrictions @args } # Note: Uses same PreReplaceCommand as restrictions
PostReplaceCommand = { Start-PostReplaceEnrollmentRestrictions @args } # Note: Uses same PostReplaceCommand as restrictions
PreFilesImportCommand = { Start-PreFilesImportEnrollmentRestrictions @args } # Note: Uses same PreFilesImportCommand as restrictions
PreImportAssignmentsCommand = { Start-PreImportAssignmentsEnrollmentRestrictions @args } # Note: Uses same PreFilesImportCommand as restrictions
PostListCommand = { Start-PostListESP @args }
#PreUpdateCommand = { Start-PreUpdateEnrollmentRestrictions @args } # Note: Uses same PreUpdateCommand as restrictions
#QUERYLIST = "`$filter=endsWith(id,'Windows10EnrollmentCompletionPageConfiguration')"
@@ -277,6 +280,7 @@ function Invoke-InitializeModule
PostReplaceCommand = { Start-PostReplaceEnrollmentRestrictions @args }
PreFilesImportCommand = { Start-PreFilesImportEnrollmentRestrictions @args }
PostListCommand = { Start-PostListEnrollmentRestrictions @args }
PreImportAssignmentsCommand = { Start-PreImportAssignmentsEnrollmentRestrictions @args }
#PreUpdateCommand = { Start-PreUpdateEnrollmentRestrictions @args }
PropertiesToRemoveForUpdate = @('priority')
Permissons=@("DeviceManagementServiceConfig.ReadWrite.All")
@@ -310,12 +314,14 @@ function Invoke-InitializeModule
PostExportCommand = { Start-PostExportAdministrativeTemplate @args }
PostCopyCommand = { Start-PostCopyAdministrativeTemplate @args }
PostFileImportCommand = { Start-PostFileImportAdministrativeTemplate @args }
PreImportCommand = { Start-PreImportAdministrativeTemplate @args }
LoadObject = { Start-LoadAdministrativeTemplate @args }
PropertiesToRemove = @("definitionValues")
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
Icon="DeviceConfiguration"
GroupId = "DeviceConfiguration"
CompareValue = "CombinedValueWithLabel"
Dependencies = @("ADMXFiles")
})
Add-ViewItem (New-Object PSObject -Property @{
@@ -431,7 +437,7 @@ function Invoke-InitializeModule
Id = "Applications"
API = "/deviceAppManagement/mobileApps"
ViewID = "IntuneGraphAPI"
PropertiesToRemove = @('uploadState','publishingState','isAssigned','dependentAppCount','supersedingAppCount','supersededAppCount','committedContentVersion','isFeatured','size','categories')
PropertiesToRemove = @('uploadState','publishingState','isAssigned','dependentAppCount','supersedingAppCount','supersededAppCount','committedContentVersion','isFeatured','size','categories') #,'minimumSupportedWindowsRelease'
QUERYLIST = "`$filter=(microsoft.graph.managedApp/appAvailability%20eq%20null%20or%20microsoft.graph.managedApp/appAvailability%20eq%20%27lineOfBusiness%27%20or%20isAssigned%20eq%20true)&`$orderby=displayName"
QuerySearch=$true
Permissons=@("DeviceManagementApps.ReadWrite.All")
@@ -446,11 +452,17 @@ function Invoke-InitializeModule
PreUpdateCommand = { Start-PreUpdateApplication @args }
PreImportCommand = { Start-PreImportCommandApplication @args }
DetailExtension = { Add-DetailExtensionApplications @args }
PreImportAssignmentsCommand = { Start-PreImportAssignmentsApplications @args }
PreDeleteCommand = { Start-PreDeleteApplications @args }
PostExportCommand = { Start-PostExportApplications @args }
PostListCommand = { Start-PostListApplications @args }
ExportExtension = { Add-ScriptExportExtensions @args }
GroupId = "Apps"
ScopeTagsReturnedInList = $false
})
Add-ViewItem (New-Object PSObject -Property @{
Title = "AutoPilot"
Title = "Autopilot"
Id = "AutoPilot"
API = "/deviceManagement/windowsAutopilotDeploymentProfiles"
ViewID = "IntuneGraphAPI"
@@ -548,7 +560,9 @@ function Invoke-InitializeModule
Icon="DeviceConfiguration"
PostExportCommand = { Start-PostExportSettingsCatalog @args }
PreUpdateCommand = { Start-PreUpdateSettingsCatalog @args }
GroupId = "DeviceConfiguration"
PostGetCommand = { Start-PostGetSettingsCatalog @args }
Dependencies = @("ReusableSettings")
GroupId = "DeviceConfiguration"
})
Add-ViewItem (New-Object PSObject -Property @{
@@ -577,6 +591,7 @@ function Invoke-InitializeModule
QUERYLIST = "`$filter=isBuiltIn%20eq%20false"
Permissons=@("DeviceManagementRBAC.ReadWrite.All")
PostExportCommand = { Start-PostExportScopeTags @args }
PostGetCommand = { Start-PostGetScopeTags @args }
ImportOrder = 10
DocumentAll = $true
GroupId = "TenantAdmin"
@@ -637,6 +652,7 @@ function Invoke-InitializeModule
GroupId = "TenantAdmin"
PropertiesToRemoveForUpdate = @('platform')
ExpandAssignmentsList = $false
PropertiesToRemove = @("payloads")
})
Add-ViewItem (New-Object PSObject -Property @{
@@ -648,6 +664,8 @@ function Invoke-InitializeModule
PreDeleteCommand = { Start-PreDeleteDeviceHealthScripts @args }
PreImportCommand = { Start-PreImportDeviceHealthScripts @args }
PreUpdateCommand = { Start-PreUpdateDeviceHealthScripts @args }
PostExportCommand = { Start-PostExportDeviceHealthScripts @args }
ExportExtension = { Add-ScriptExportExtensions @args }
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
GroupId = "EndpointAnalytics"
Icon = "Report"
@@ -655,6 +673,66 @@ function Invoke-InitializeModule
PropertiesToRemoveForUpdate = @('version','isGlobalScript','highestAvailableVersion')
})
Add-ViewItem (New-Object PSObject -Property @{
Title = "ADMX Files"
Id = "ADMXFiles"
ViewID = "IntuneGraphAPI"
NameProperty = "fileName"
API = "/deviceManagement/groupPolicyUploadedDefinitionFiles"
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
ImportOrder = 45
GroupId = "DeviceConfiguration"
Icon = "DeviceConfiguration"
ExpandAssignmentsList = $false
PreFilesImportCommand = { Start-PreFilesImportADMXFiles @args }
PreImportCommand = { Start-PreImportADMXFiles @args }
PreDeleteCommand = { Start-PreDeleteADMXFiles @args }
ViewProperties = @("fileName","status","Id")
PropertiesToRemove = @("languageCodes","targetPrefix","targetNamespace","policyType","revision","status","uploadDateTime")
})
<#
Add-ViewItem (New-Object PSObject -Property @{
Title = "iOS Enrollment Profile"
Id = "iOSDepProfile"
ViewID = "IntuneGraphAPI"
API = "/deviceManagement/depIOSEnrollmentProfile"
Permissons=@("DeviceManagementServiceConfig.ReadWrite.All")
GroupId = "DeviceConfiguration"
Icon = "DeviceConfiguration"
ExpandAssignmentsList = $false
ViewProperties = @("fileName","status","Id")
})
#>
Add-ViewItem (New-Object PSObject -Property @{
Title = "Reusable Settings"
Id = "ReusableSettings"
ViewID = "IntuneGraphAPI"
API = "/deviceManagement/reusablePolicySettings"
PropertiesToRemove = @('Settings','@OData.Type')
PostGetCommand = { Start-PostGetReusableSettings @args }
ImportOrder = 70
Permissons=@("DeviceManagementConfiguration.ReadWrite.All")
ExpandAssignmentsList = $false
SkipRemoveProperties = @("@OData.Type")
Icon = "EndpointSecurity"
GroupId = "EndpointSecurity"
})
Add-ViewItem (New-Object PSObject -Property @{
Title = "Authentication Strengths"
Id = "AuthenticationStrengths"
ViewID = "IntuneGraphAPI"
API = "/identity/conditionalAccess/authenticationStrengths/policies"
PreImportCommand = { Start-PreImportCommandAuthenticationStrengths @args }
PropertiesToRemove = @()
ImportOrder = 45
Permissons=@("Policy.ReadWrite.ConditionalAccess")
ExpandAssignmentsList = $false
Icon = "ConditionalAccess"
GroupId = "EndpointSecurity"
})
}
function Invoke-EMAuthenticateToMSAL
@@ -828,7 +906,7 @@ function Set-EMViewPanel
$global:btnLoadAllPages.add_click({
Write-Status "Loading $($global:curObjectType.Title) objects"
$graphObjects = @(Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -AllPages)
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -AllPages
$graphObjects | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
$global:dgObjects.ItemsSource.CommitNew()
Set-GraphPagesButtonStatus
@@ -838,7 +916,7 @@ function Set-EMViewPanel
$global:btnLoadNextPage.add_click({
Write-Status "Loading $($global:curObjectType.Title) objects"
$graphObjects = @(Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage)
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage
$graphObjects | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
$global:dgObjects.ItemsSource.CommitNew()
Set-GraphPagesButtonStatus
@@ -965,17 +1043,19 @@ function Start-PostListEndpointSecurity
if(-not $script:baseLineTemplates) { return }
foreach($obj in $objList)
{
{
if(-not $obj.Object.templateId) { continue }
if($obj.Object.templateId -ne $baseLineTemplate.Id)
{
$baseLineTemplate = $script:baseLineTemplates | Where Id -eq $obj.Object.templateId
}
if($baseLineTemplate)
{
$obj | Add-Member -MemberType NoteProperty -Name "Type" -Value $baseLineTemplate.displayName
$obj | Add-Member -MemberType NoteProperty -Name "Category" -Value (?: ($baseLineTemplate.templateSubtype -eq "none") $baseLineTemplate.templateType $baseLineTemplate.templateSubtype)
}
}
$objList
}
@@ -993,7 +1073,7 @@ function Start-PostExportEndpointSecurity
$settings = Invoke-GraphRequest -Url "$($objectType.API)/$($obj.id)/settings"
$settingsJson = "{ `"settings`": $((ConvertTo-Json $settings.value -Depth 20 ))`n}"
$fileName = "$path\$((Remove-InvalidFileNameChars $fileName))_Settings.json"
$settingsJson | Out-File -LiteralPath $fileName -Force
Save-GraphObjectToFile $settingsJson $fileName
}
function Start-PostFileImportEndpointSecurity
@@ -1004,7 +1084,7 @@ function Start-PostFileImportEndpointSecurity
if($settings)
{
Start-GraphPreImport $settings
Invoke-GraphRequest -Url "$($objectType.API)/$($obj.id)/updateSettings" -Body ($settings | ConvertTo-Json -Depth 20) -Method "POST"
Invoke-GraphRequest -Url "$($objectType.API)/$($obj.id)/updateSettings" -Body ($settings | ConvertTo-Json -Depth 50) -Method "POST"
}
}
@@ -1088,6 +1168,18 @@ function Start-PreUpdateEndpointSecurity
Remove-Property $obj "templateId"
}
function Start-PostGetEndpointSecurity
{
param($obj, $objectType)
Add-EndpointSecurityInfo $obj
}
function local:Add-EndpointSecurityInfo
{
param($obj, $baseLineTemplate = $null)
}
#endregion
#region
@@ -1098,7 +1190,7 @@ function Start-PostFileImportDeviceConfiguration
if($obj.'@OData.Type' -like "#microsoft.graph.windows10GeneralConfiguration")
{
$tmpObj = Get-Content -LiteralPath $importFile | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $importFile
if(($tmpObj.privacyAccessControls | measure).Count -gt 0)
{
@@ -1794,15 +1886,23 @@ function Start-PostFileImportApplications
{
param($obj, $objectType, $file)
$tmpObj = Get-Content -LiteralPath $file | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $file
if(-not ($obj.PSObject.Properties | Where Name -eq '@odata.type'))
{
# Add @odata.type property if it is missing. Required by app package import
$obj | Add-Member -MemberType NoteProperty -Name '@odata.type' -Value $objectType.'@odata.type'
}
$fi = [IO.FileInfo]$file
$tmpFilName = $fi.DirectoryName + "\" + $obj.FileName
if([IO.File]::Exists($tmpFilName) -eq $false)
{
$tmpFilName = $null
}
Start-ImportApp $obj
Start-ImportApp $obj $tmpFilName
}
function local:Start-ImportApp
@@ -1887,7 +1987,15 @@ function Start-PreImportCommandApplication
Write-Log "App type '$($obj.'@OData.Type')' not supported for import" 2
@{ "Import" = $false }
}
}
if($obj.'@OData.Type' -eq '#microsoft.graph.officeSuiteApp')
{
if($obj.officeSuiteAppDefaultFileFormat -eq "notConfigured")
{
$obj.officeSuiteAppDefaultFileFormat = "officeOpenXMLFormat"
}
}
}
function Add-DetailExtensionApplications
{
@@ -1938,6 +2046,94 @@ function Add-DetailExtensionApplications
}
}
function Start-PreImportAssignmentsApplications
{
param($obj, $objectType, $file, $assignments)
if($obj.'@odata.type' -eq "#microsoft.graph.windowsMicrosoftEdgeApp")
{
foreach($assignment in $assignments)
{
Remove-Property $assignment.target "deviceAndAppManagementAssignmentFilterId"
Remove-Property $assignment.target "deviceAndAppManagementAssignmentFilterType"
}
@{"Assignments"=$assignments}
}
}
function Start-PreDeleteApplications
{
if($obj.'@odata.type' -eq "#microsoft.graph.microsoftStoreForBusinessApp")
{
# Don't delete Microsoft Store for Business Apps
@{ "Delete" = $false }
}
}
function Start-PostExportApplications
{
param($obj, $objectType, $path)
if($global:chkExportScript.IsChecked)
{
$fileName = Get-GraphObjectFile $obj $objectType
$fi = [IO.FileInfo]"$path\$fileName"
try
{
foreach($rule in ($obj.detectionRules | Where '@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptDetection"))
{
if($rule.ScriptContent)
{
[IO.File]::WriteAllBytes(("$path\$($fi.BaseName)_DetectionScript.ps1"), ([System.Convert]::FromBase64String($rule.ScriptContent)))
}
}
foreach($rule in $obj.requirementRules)
{
if($rule.'@OData.Type' -eq "#microsoft.graph.win32LobAppPowerShellScriptRequirement")
{
if($rule.ScriptContent)
{
[IO.File]::WriteAllBytes(("$path\$($fi.BaseName)_RequirementScript.ps1"), ([System.Convert]::FromBase64String($rule.ScriptContent)))
}
}
}
}
catch
{
Write-LogError "Failed to export scripts" $_.Exception
}
}
}
function Start-PostListApplications
{
param($objList, $objectType)
foreach($obj in ($objList | Where { $_.Object."@OData.Type" -eq "#microsoft.graph.winGetApp"}))
{
if($obj.Object.packageIdentifier -like "9*")
{
$installerType = "UWP"
}
elseif($obj.Object.packageIdentifier -like "X*")
{
$installerType = "Win32"
}
else
{
$objName = Get-GraphObjectName $obj.Object $objectType
Write-Log "Unknown package identifier for app $($objName): $($obj.Object.packageIdentifier)" 2
$installerType = "Unknown"
}
$obj.Object | Add-Member -MemberType NoteProperty -Name "InstallerType" -Value $installerType
}
$objList
}
#endregion
#region Group Policy/Administrative Templates functions
@@ -1960,6 +2156,14 @@ function Get-GPOObjectSettings
"definition@odata.bind" = "$($global:graphURL)/deviceManagement/groupPolicyDefinitions('$($definitionValue.definition.id)')"
}
if($GPOObj.policyConfigurationIngestionType -eq "Custom")
{
$obj.Add("#Definition_Id", $definitionValue.definition.id)
$obj.Add("#Definition_displayName", $definitionValue.definition.displayName)
$obj.Add("#Definition_classType", $definitionValue.definition.classType)
$obj.Add("#Definition_categoryPath", $definitionValue.definition.categoryPath)
}
if($presentationValues.value)
{
# Policy presentation values set e.g. a drop down list, check box, text box etc.
@@ -1970,6 +2174,11 @@ function Get-GPOObjectSettings
# Add presentation@odata.bind property that links the value to the presentation object
$presentationValue | Add-Member -MemberType NoteProperty -Name "presentation@odata.bind" -Value "$($global:graphURL)/deviceManagement/groupPolicyDefinitions('$($definitionValue.definition.id)')/presentations('$($presentationValue.presentation.id)')"
if($GPOObj.policyConfigurationIngestionType -eq "Custom")
{
$presentationValue | Add-Member -MemberType NoteProperty -Name "#Presentation_Id" -Value $presentationValue.presentation.id
$presentationValue | Add-Member -MemberType NoteProperty -Name "#Presentation_Label" -Value $presentationValue.presentation.label
}
#Remove presentation object so it is not included in the export
Remove-ObjectProperty $presentationValue "presentation"
@@ -1989,16 +2198,121 @@ function Get-GPOObjectSettings
function Import-GPOSetting
{
param($obj, $settings)
param($obj, $settings, [switch]$CustomADMX)
if($obj)
{
Write-Status "Import settings for $($obj.displayName)"
$isCustomADMX = $CustomADMX -eq $true
if($isCustomADMX)
{
Write-Status "Import custom ADMX settings"
if(-not $script:CustomADMXDefinitions)
{
$tmpCustomCategories = Invoke-GraphRequest -Url "deviceManagement/groupPolicyCategories?`$expand=definitions(`$select=id, displayName, categoryPath, classType)&`$select=id, displayName&`$filter=ingestionSource eq 'custom'" -ODataMetadata "Minimal"
if($tmpCustomCategories.Value)
{
$script:CustomADMXDefinitions = @{}
foreach($tmpCat in $tmpCustomCategories.Value)
{
foreach($tmpDef in $tmpCat.definitions)
{
$key = ($tmpDef.displayName + $tmpDef.categoryPath + $tmpDef.classType).ToLower()
$val = [PSCustomObject]@{
Definition = $tmpDef
Category = $tmpCat
Presentations = $null
}
$script:CustomADMXDefinitions.Add($key, $val)
}
}
}
}
}
foreach($setting in $settings)
{
if($isCustomADMX -and $script:CustomADMXDefinitions -is [HashTable] -and $script:CustomADMXDefinitions.Count -gt 0)
{
$defVal = $null
$key = ($setting.'#Definition_displayName' + $setting.'#Definition_categoryPath' + $setting.'#Definition_classType').ToLower()
if($key -and $script:CustomADMXDefinitions.ContainsKey($key))
{
$defVal = $script:CustomADMXDefinitions[$key]
}
elseif($key)
{
Write-Log "No custom ADMX definitiona found for setting $($setting.'#Definition_displayName')" 2
}
else
{
Write-Log "Setting $($setting.'#Definition_displayName') does not have information to be imported in the environment"
}
if($defVal)
{
$setting.'definition@odata.bind' = $setting.'definition@odata.bind' -replace $setting.'#Definition_Id', $defVal.Definition.Id
if(($setting.presentationValues | measure).Count -gt 0)
{
if(-not $defVal.Presentations)
{
$tmpPresentation = Invoke-GraphRequest -Url "deviceManagement/groupPolicyDefinitions/$($defVal.Definition.Id)/presentations" -ODataMetadata "Minimal"
if($tmpPresentation.value)
{
foreach($settingPresentation in $setting.presentationValues)
{
$tmpPresentationVal = $tmpPresentation.value | Where label -eq $settingPresentation.'#Presentation_Label'
if($tmpPresentationVal)
{
$settingPresentation.'presentation@odata.bind' = $settingPresentation.'presentation@odata.bind' -replace $setting.'#Definition_Id', $defVal.Definition.Id
$settingPresentation.'presentation@odata.bind' = $settingPresentation.'presentation@odata.bind' -replace $settingPresentation.'#Presentation_Id', $tmpPresentationVal.Id
}
else
{
Write-Log "Could not find a presentation value with label $($settingPresentation.'#Presentation_Label'). Setting will not be configured" 2
continue
}
}
}
else
{
Write-Log "Could not find presentation for setting $($settingPresentation.'#Presentation_Label'). Setting will not be configured." 2
continue
}
}
}
}
else
{
Write-Log "Settings might not be available if imported in another environment" 3
}
}
elseif($isCustomADMX)
{
Write-Log "Custom AMDX settings cannot be imported without ADMX file imported. Definitions not found" 2
continue
}
Start-GraphPreImport $setting
if($true) #$isCustomADMX)
{
foreach($tmpProp in (($setting.PSObject.Properties | Where Name -like "#*").Name))
{
Remove-Property $setting $tmpProp
}
foreach($settingPresentation in $setting.presentationValues)
{
foreach($tmpProp in (($settingPresentation.PSObject.Properties | Where Name -like "#*").Name))
{
Remove-Property $settingPresentation $tmpProp
}
}
}
# Import each setting for the Administrative Template profile
Invoke-GraphRequest -Url "/deviceManagement/groupPolicyConfigurations/$($obj.id)/definitionValues" -Content (ConvertTo-Json $setting -Depth 20) -HttpMethod POST | Out-Null
}
@@ -2015,7 +2329,6 @@ function Start-PostExportAdministrativeTemplate
$fileName = ($fileName + "_" + $obj.Id)
}
# Collect and save all the settings of the Administrative Templates profile
if($obj.definitionValues)
{
$settings = $obj.definitionValues
@@ -2026,7 +2339,7 @@ function Start-PostExportAdministrativeTemplate
}
$fileName = "$path\$((Remove-InvalidFileNameChars $fileName))_Settings.json"
ConvertTo-Json $settings -Depth 20 | Out-File -LiteralPath $fileName -Force
Save-GraphObjectToFile $settings $fileName
}
function Start-PostCopyAdministrativeTemplate
@@ -2044,10 +2357,12 @@ function Start-PostFileImportAdministrativeTemplate
{
param($obj, $objectType, $file)
$settings = Get-EMSettingsObject $obj $objectType $file
$settings = Get-EMSettingsObject $obj $objectType $file -settingsProperty "definitionValues" -SettingsArray
if($settings)
{
Import-GPOSetting $obj $settings
{
$tmpObj = Get-GraphObjectFromFile $file
Import-GPOSetting $obj $settings -CustomADMX:($tmpObj.policyConfigurationIngestionType -eq "Custom")
}
}
@@ -2059,8 +2374,8 @@ function Start-LoadAdministrativeTemplate
$fi = [IO.FileInfo]$fileName
if($fi.Exists -eq $false) { return }
$obj = Get-Content -LiteralPath $fi.FullName | ConvertFrom-Json
$obj = Get-GraphObjectFromFile $fi.FullName
if($obj.definitionValues)
{
@@ -2071,7 +2386,7 @@ function Start-LoadAdministrativeTemplate
if([IO.File]::Exists($settingsFile))
{
$definitionValues = Get-Content -LiteralPath $settingsFile | ConvertFrom-Json
$definitionValues = Get-GraphObjectFromFile $settingsFile
$obj | Add-Member Noteproperty -Name "definitionValues" -Value $definitionValues -Force
}
@@ -2099,6 +2414,13 @@ function Start-PostGetAdministrativeTemplate
#>
}
function Start-PreImportAdministrativeTemplate
{
param($obj, $objectType, $file, $assignments)
}
#endregion
#region Policy Sets function
@@ -2274,7 +2596,7 @@ function Start-PostExportRoleDefinitions
$fileName = "$path\$((Remove-InvalidFileNameChars $fileName)).json"
if([IO.File]::Exists($fileName))
{
$tmpObj = Get-Content -LiteralPath $fileName | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $fileName
}
else
{
@@ -2298,7 +2620,7 @@ function Start-PostExportRoleDefinitions
if($roleAssignmentsArr.Count -gt 0)
{
$tmpObj.RoleAssignments = $roleAssignmentsArr
$tmpObj | ConvertTo-Json -Depth 20 | Out-File -LiteralPath $fileName
Save-GraphObjectToFile $tmpObj $fileName
}
}
}
@@ -2315,7 +2637,7 @@ function Start-PostFileImportRoleDefinitions
{
param($obj, $objectType, $file)
$tmpObj = Get-Content -LiteralPath $file | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $file
$loadedScopeTags = $global:LoadedDependencyObjects["ScopeTags"]
if(($tmpObj.RoleAssignments | measure).Count -gt 0 -and ($loadedScopeTags | measure).Count -gt 0)
@@ -2365,6 +2687,21 @@ function Start-PreUpdateSettingsCatalog
@{"Method"="PUT"}
}
function Start-PostGetSettingsCatalog
{
param($obj, $objectType)
if(-not $obj.Object.Assignments)
{
$url = "$($objectType.API)/$($obj.id)/assignments"
$assignments = (Invoke-GraphRequest -Url $url).Value
if($assignments)
{
$obj.Object.Assignments = $assignments
}
}
}
#endregion
#region Notification functions
@@ -2381,7 +2718,7 @@ function Start-PostFileImportNotifications
{
param($obj, $objectType, $file)
$tmpObj = Get-Content -LiteralPath $file | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $file
foreach($localizedNotificationMessage in $tmpObj.localizedNotificationMessages)
{
@@ -2535,6 +2872,17 @@ function Start-PostListEnrollmentRestrictions
}
}
function Start-PreImportAssignmentsEnrollmentRestrictions
{
param($obj, $objectType, $file, $assignments)
if($obj.Priority -eq 0)
{
# Skip Assignment for Default Policy
@{ "Import" = $false }
}
}
#endregion
#region
@@ -2554,6 +2902,19 @@ function Start-PostExportScopeTags
Add-EMAssignmentsToExportFile $obj $objectType $path
}
function Start-PostGetScopeTags
{
param($obj, $objectType)
$strAPI = "$($objectType.API)/$($obj.Object.Id)/assignments"
$tmpObj = Invoke-GraphRequest -Url $strAPI
if(($tmpObj.value | measure).count -gt 0)
{
$obj.Object.assignments = $tmpObj.value
}
}
#endregion
#region AutoPilot
@@ -2623,6 +2984,34 @@ function Start-PreUpdateDeviceHealthScripts
}
}
function Start-PostExportDeviceHealthScripts
{
param($obj, $objectType, $path)
if($global:chkExportScript.IsChecked)
{
$fileName = Get-GraphObjectFile $obj $objectType
$fi = [IO.FileInfo]"$path\$fileName"
try
{
if($obj.detectionScriptContent)
{
[IO.File]::WriteAllBytes(("$path\$($fi.BaseName)_DetectionScript.ps1"), ([System.Convert]::FromBase64String($obj.detectionScriptContent)))
}
if($obj.remediationScriptContent)
{
[IO.File]::WriteAllBytes(("$path\$($fi.BaseName)_RemediationScript.ps1"), ([System.Convert]::FromBase64String($obj.remediationScriptContent)))
}
}
catch
{
Write-LogError "Failed to export scripts" $_.Exception
}
}
}
#endregion
#region Generic functions
@@ -2645,7 +3034,7 @@ function Save-EMDefaultPolicy
# Clean up from old version of the script that used the wrong name for Default policies
try { [IO.File]::Delete($oldFile) | Out-Null } Catch {}
}
$obj | ConvertTo-Json -Depth 20 | Out-File -LiteralPath "$path\$((Remove-InvalidFileNameChars $fileName)).json"
Save-GraphObjectToFile $obj "$path\$((Remove-InvalidFileNameChars $fileName)).json"
}
}
catch {}
@@ -2653,13 +3042,31 @@ function Save-EMDefaultPolicy
}
function Get-EMSettingsObject
{
param($obj, $objectType, $file)
param($obj, $objectType, $file, $settingsProperty = "settings", [switch]$SettingsArray)
if($obj.Settings) { $obj.Settings }
if($obj.$settingsProperty) { return $obj.$settingsProperty }
$fi = [IO.FileInfo]$file
if($fi.Exists)
{
# Settings property removed during import so lets try exported file first
$tmpObj = Get-GraphObjectFromFile $fi.FullName
if($SettingsArray -eq $true)
{
# Only the an array of settings is expected
return $tmpObj.$settingsProperty
}
else
{
if($tmpObj.$settingsProperty)
{
# A property with the an array of settings is expected
return ([PSCustomObject]@{
$settingsProperty = $tmpObj.$settingsProperty
})
}
}
Write-Log "Settings not included in export file. Try import from _Settings.json file" 2
$settingsFile = $fi.DirectoryName + "\" + $fi.BaseName + "_Settings.json"
$fiSettings = [IO.FileInfo]$settingsFile
@@ -2667,9 +3074,8 @@ function Get-EMSettingsObject
{
Write-Log "Settings file '$($fiSettings.FullName)' was not found" 2
return
}
(Get-Content -LiteralPath $fiSettings.FullName) | ConvertFrom-Json
}
Get-GraphObjectFromFile $fiSettings.FullName
}
else
{
@@ -2692,7 +3098,8 @@ function Add-EMAssignmentsToExportFile
Write-Log "File not found: $fileName. Could not add assignments to file" 3
return
}
$tmpObj = Get-Content -LiteralPath $fileName | ConvertFrom-Json
$tmpObj = Get-GraphObjectFromFile $fileName
if(-not $url)
{
@@ -2709,7 +3116,7 @@ function Add-EMAssignmentsToExportFile
{
$tmpObj.Assignments = $assignments
}
ConvertTo-Json $tmpObj -Depth 20 | Out-File -LiteralPath $fileName -Force
Save-GraphObjectToFile $tmpObj $fileName
}
}
@@ -2828,6 +3235,17 @@ function Start-PreImportConditionalAccess
{
$obj.state = $global:cbImportCAState.SelectedValue
}
if($obj.grantControls.authenticationStrength)
{
$obj.grantControls.operator = "AND"
$tmpObj = Get-GraphObjectFromFile $file
$authSetting = [PSCustomObject]@{
id = $tmpObj.grantControls.authenticationStrength.id
}
$obj.grantControls.authenticationStrength = $authSetting
}
}
function Start-PostExportConditionalAccess
@@ -2906,12 +3324,135 @@ function Start-PreImportTermsOfUse
return
}
Write-Log "Add file data: $pdfFile"
$bytes = [IO.File]::ReadAllBytes($pdfFile)
$file.fileData = [PSCustomObject]@{
data = [Convert]::ToBase64String($bytes)
}
}
}
function Start-PostExportTermsOfUse
{
param($obj, $objectType, $path)
foreach($file in $obj.Files)
{
$url = "agreements/$($obj.id)/file/localizations('$($file.id)')/fileData/data"
$data = (Invoke-GraphRequest -Url $url -ODataMetadata "Minimal").Value
if($data)
{
Write-Log "Save file $($file.FileName)"
$fileName = "$path\$($file.FileName)"
[IO.File]::WriteAllBytes($fileName, [System.Convert]::FromBase64String($data))
}
}
}
#endregion
#region ADMXFiles
function Start-PreFilesImportADMXFiles
{
param($objectType, $filesToImport)
$filesToImport | sort-object -property @{e={$_.Object.lastModifiedDateTime}}
}
function Start-PreImportADMXFiles
{
param($obj, $objectType, $file, $assignments)
$pkgPath = Get-SettingValue "EMIntuneAppPackages"
if(-not $pkgPath -or [IO.Directory]::Exists($pkgPath) -eq $false)
{
Write-Log "Intune app directory is either missing or does not exist" 2
$pkgPath = $null
}
try
{
$fi = [IO.FileInfo]$file
} catch {}
$admxFile = $null
if($fi.Directory.FullName)
{
$admxFile = "$($fi.Directory.FullName)\$($obj.fileName)"
$admlFile = "$($fi.Directory.FullName)\$([io.path]::GetFileNameWithoutExtension($obj.fileName)).adml"
}
if($null -ne $pkgPath -and ($null -eq $admxFile -or [IO.File]::Exists($admxFile) -eq $false -or [IO.File]::Exists($admxFile) -eq $false))
{
Write-Log "$($obj.fileName) not foud in Export folder. Look in package path: $pkgPath"
$admxFile = "$($pkgPath)\$($obj.fileName)"
$admlFile = "$($pkgPath)\$([io.path]::GetFileNameWithoutExtension($obj.fileName)).adml"
}
if([IO.File]::Exists($admxFile) -eq $false)
{
Write-Log "ADMX (or ADML) file $($obj.fileName) not found. The ADMXFile object will not be imported." 2
@{"Import" = $false}
return
}
$bytes = [IO.File]::ReadAllBytes($admxFile)
$obj.content = [Convert]::ToBase64String($bytes)
$bytes = [IO.File]::ReadAllBytes($admlFile)
$obj.groupPolicyUploadedLanguageFiles += [PSCustomObject]@{
fileName = [io.path]::GetFileName($admlFile)
content = [Convert]::ToBase64String($bytes)
languageCode = (?? $obj.defaultLanguageCode "en-US")
}
$obj.defaultLanguageCode = ""
}
function Start-PreDeleteADMXFiles
{
param($obj, $objectType)
Write-Status "Delete $($obj.fileName)"
$strAPI = ($objectType.API + "/$($obj.Id)/remove")
Write-Log "Delete $($objectType.Title) object $($obj.fileName)"
Invoke-GraphRequest -Url $strAPI -HttpMethod "POST" -ODataMetadata "none" | Out-Null
@{ "Delete" = $false }
}
#endregion
#region Reusable Groups
function Start-PostGetReusableSettings
{
param($obj, $objectType)
$strAPI = "$($objectType.API)/$($obj.Object.Id)?`$select=settinginstance,displayname,description"
$tmpObj = Invoke-GraphRequest -Url $strAPI
if($tmpObj.settingInstance)
{
$obj.Object | Add-Member Noteproperty -Name "settingInstance" -Value $tmpObj.settingInstance -Force
}
}
#endregon
#region Authentication Strength
function Start-PreImportCommandAuthenticationStrengths
{
param($obj, $objectType, $file, $assignments)
if($obj.policyType -ne "custom")
{
Write-Log "Built-in Authentication Strength objects cannot be imported" 2
@{ "Import" = $false }
}
}
#endregion
Export-ModuleMember -alias * -function *
+49 -14
View File
@@ -10,7 +10,7 @@ This module manages Application objects in Intune e.g. uploading application fil
#>
function Get-ModuleVersion
{
'3.4.0'
'3.7.4'
}
#########################################################################################
@@ -362,21 +362,32 @@ function Send-IntuneFileToAzureStorage
$currentChunk = $chunk + 1
Write-Status "Uploading file to Azure Storage`n`nUploading chunk $currentChunk of $chunks ($(($currentChunk / $chunks*100))%)"
Write-Status "Uploading file to Azure Storage`n`nUploading chunk $currentChunk of $chunks ($(("{0:N2}" -f ($currentChunk / $chunks*100)))%)"
Write-AzureStorageChunk $sasUri $id $bytes
if((Write-AzureStorageChunk $sasUri $id $bytes) -eq $false)
{
Write-Log "Upload failed. Abourting..." 3
break
}
if ($currentChunk -lt $chunks -and $sasRenewalTimer.ElapsedMilliseconds -ge 450000)
{
Request-RenewAzureStorageUpload $fileUri
$sasRenewalTimer.Restart()
}
}
$reader.Close()
}
}
catch
{
Write-Log "Failed to send file to Intune. $($_.Exception.Message)" 3
}
finally
{
if ($reader -ne $null) { $reader.Dispose() }
if ($reader -ne $null)
{
$reader.Close()
$reader.Dispose()
}
}
# Finalize the upload.
@@ -443,15 +454,39 @@ function Write-AzureStorageChunk
$curProgressPreference = $ProgressPreference
$ProgressPreference = 'SilentlyContinue'
try
{
$response = Invoke-WebRequest $uri -Method Put -Headers $headers -Body $encodedBody
}
catch
{
Write-Log "Failed to upload file chunk. $($_.Exception.Message)" 3
}
$success = $false
$retryCount = 0
while($true)
{
try
{
$response = Invoke-WebRequest $uri -Method Put -Headers $headers -Body $encodedBody
if($retryCount -gt 0)
{
Write-Log "Chunk uploaded successfully"
}
$success = $true
break
}
catch
{
if($_.Exception.HResult -eq -2146233079 -and $retryCount -lt 6)
{
Write-Log "Failed to upload file chunk. Retry in 10 s" 2
$retryCount++
Start-Sleep -Seconds 10
}
else
{
Write-Log "Failed to upload file chunk. $($_.Exception.Message)" 3
break
}
}
}
$ProgressPreference = $curProgressPreference
$success
}
function Get-IntuneKey
+26 -7
View File
@@ -10,7 +10,7 @@ This module manages Authentication for the application with MSAL. It is also res
#>
function Get-ModuleVersion
{
'3.7.0'
'3.8.1'
}
$global:msalAuthenticator = $null
@@ -37,7 +37,7 @@ function Invoke-InitializeModule
Name = "Azure AD China"
Value = "china"
URL = "login.partner.microsoftonline.cn"
GraphURL = "https://microsoftgraph.chinacloudapi.cn"
GraphURL = "microsoftgraph.chinacloudapi.cn"
}
)
@@ -209,16 +209,15 @@ function Set-MSALGraphEnvironment
}
}
}
elseif($cuAADEnv.GraphURL)
elseif($curAADEnv.GraphURL)
{
$graphEnv = $cuAADEnv.GraphURL
$graphEnv = $curAADEnv.GraphURL
}
Write-Log "Use Graph environment: $graphEnv"
$global:MSALGraphEnvironment = $graphEnv
}
function Get-MSALUserInfo
{
if($global:MSALToken)
@@ -231,7 +230,7 @@ function Get-MSALUserInfo
$global:Me = $tmpMe
Write-Log "Get profile picture"
$global:profilePhoto = "$($env:LOCALAPPDATA)\CloudAPIPowerShellManagement\$($global:Me.Id).jpeg"
MSGraph\Invoke-GraphRequest "me/photos/48x48/`$value" -OutFile $global:profilePhoto -SkipAuthentication | Out-Null
MSGraph\Invoke-GraphRequest "me/photos/48x48/`$value" -OutFile $global:profilePhoto -SkipAuthentication -NoError | Out-Null
}
Write-Log "Get organization info"
@@ -573,7 +572,27 @@ function Connect-MSALClientApp
}
elseif($Certificate)
{
$ClientApplicationBuilder = [Microsoft.Identity.Client.ConfidentialClientApplicationBuilder]::Create($clientId).WithCertificate($Certificate).WithAuthority([URI]::new($authority)) #.WithRedirectUri($redirectUri)
$f = [System.Security.Cryptography.X509Certificates.OpenFlags]::ReadOnly
$cert = $null
# Try LocalMachine store first, if not found try also CurrentUser store
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("My", "LocalMachine")
$null = $store.Open($f)
$cert = $store.Certificates | Where-Object {$_.Thumbprint -eq $Certificate}
$null = $store.Close()
if($null -eq $cert)
{
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("My", "CurrentUser")
$null = $store.Open($f)
$cert = $store.Certificates | Where-Object {$_.Thumbprint -eq $Certificate}
$null = $store.Close()
}
if($null -eq $cert)
{
Write-LogError "Could not find a certificate with thumbprint '$($Certificate)' in LocalMachine or CurrentUser store"
return
}
$ClientApplicationBuilder = [Microsoft.Identity.Client.ConfidentialClientApplicationBuilder]::Create($clientId).WithCertificate($cert).WithAuthority([URI]::new($authority)) #.WithRedirectUri($redirectUri)
}
else
{
+226 -32
View File
@@ -10,7 +10,7 @@ This module manages Microsoft Grap fuctions like calling APIs, managing graph ob
#>
function Get-ModuleVersion
{
'3.7.0'
'3.8.1'
}
$global:MSGraphGlobalApps = @(
@@ -451,7 +451,35 @@ function Invoke-GraphRequest
}
else
{
Write-LogError "Failed to invoke MS Graph with URL $Url (Request ID: $requestId). Status code: $($_.Exception.Response.StatusCode)" $_.Excption
$extMessage = $null
try
{
$reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
$reader.BaseStream.Position = 0
$reader.DiscardBufferedData()
$response = $reader.ReadToEnd() | ConvertFrom-Json
if($response.Error.Message)
{
$extMessage = $response.Error.Message
try
{
if($response.Error.Message.StartsWith("{") -and $response.Error.Message.EndsWith("}"))
{
$message = $response.Error.Message | ConvertFrom-Json
if($message.Message)
{
$extMessage = ". Response message: $($message.Message)"
}
}
}
catch {}
$extMessage = ". Response message: $($extMessage)"
}
}
catch{}
Write-LogError "Failed to invoke MS Graph with URL $Url (Request ID: $requestId). Status code: $($_.Exception.Response.StatusCode)$extMessage" $_.Exception
}
}
} while($retryRequest -eq $true)
@@ -559,21 +587,31 @@ function Get-GraphObjects
if($graphObjects -and ($graphObjects | GM -Name Value -MemberType NoteProperty))
{
$retObjects = $graphObjects.Value
$retObjects = $graphObjects.Value
}
else
{
$retObjects = $graphObjects
}
$graphObjects = Add-GraphObjectProperties $retObjects $objectType $property $exclude $SortProperty
if($SingleObject -ne $true -and $objectType.PostListCommand)
if($retObjects)
{
$graphObjects = & $objectType.PostListCommand $graphObjects $objectType
$graphObjects = Add-GraphObjectProperties $retObjects $objectType $property $exclude $SortProperty
if($SingleObject -ne $true -and $objectType.PostListCommand)
{
$graphObjects = & $objectType.PostListCommand $graphObjects $objectType
}
}
else
{
$graphObjects = $null
}
$graphObjects
if(($graphObjects | measure).Count -gt 0)
{
$graphObjects
}
}
function Add-GraphObjectProperties
@@ -693,12 +731,12 @@ function Show-GraphObjects
$script:nextGraphPage = $null
$graphObjects = @(Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage -Filter $filter)
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage -Filter $filter
$dgObjects.AutoGenerateColumns = $false
$dgObjects.Columns.Clear()
if(($graphObjects | measure).Count -gt 0)
if($graphObjects)
{
$tmpObj = $graphObjects | Select -First 1
@@ -1305,6 +1343,18 @@ function Get-GraphBatchObjectTypes
$silentViewObjects
}
function Get-GraphObjectType
{
param($objTypeId)
$intuneView = $global:viewObjects | Where { $_.ViewInfo.Id -eq "IntuneGraphAPI" }
if($intuneView)
{
($intuneView.ViewItems | Where Id -eq $objTypeId)
}
}
function Start-GraphObjectExport
{
Write-Status "Export objects" -Block
@@ -1335,7 +1385,7 @@ function Start-GraphObjectExport
$folder = Expand-FileName $folder
Write-Status "Get a list of all $($item.ObjectType.Title) objects" -SkipLog -Force
$objects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
[array]$objects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
if((Get-SettingValue "UseBatchAPI") -eq $true)
{
@@ -1345,6 +1395,7 @@ function Start-GraphObjectExport
$total = ($batchObjects | measure).Count
foreach($batchResult in $batchObjects)
{
if(-not $batchResult.Object) { continue }
$objName = Get-GraphObjectName $batchResult.Object $batchResult.ObjectType
Write-Status "Export $($item.Title): $objName ($($i)/$($total))" -Force
Export-GraphObject $batchResult.Object $batchResult.ObjectType $folder -IsFullObject
@@ -1621,7 +1672,7 @@ function Show-GraphImportForm
$navigationPropObjects = @()
foreach ($fileObj in $filesToImport)
{
if($allowUpdate -and $global:cbImportType.SelectedValue -ne "alwaysImport" -and (Reset-GraphObjet $fileObj $global:dgObjects.ItemsSource))
if($allowUpdate -and $global:cbImportType.SelectedValue -ne "alwaysImport" -and (Reset-GraphObject $fileObj $global:dgObjects.ItemsSource))
{
continue
}
@@ -1839,7 +1890,7 @@ function Start-GraphObjectImport
try
{
Write-Status "Get $($item.Title) objects" -Force
$graphObjects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
[array]$graphObjects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
}
catch {}
}
@@ -1864,7 +1915,7 @@ function Start-GraphObjectImport
continue
}
if($allowUpdate -and $global:cbImportType.SelectedValue -ne "alwaysImport" -and $graphObjects -and (Reset-GraphObjet $fileObj $graphObjects))
if($allowUpdate -and $global:cbImportType.SelectedValue -ne "alwaysImport" -and $graphObjects -and (Reset-GraphObject $fileObj $graphObjects))
{
$importedObjects++
continue
@@ -2048,7 +2099,7 @@ function Show-GraphBulkDeleteForm
Write-Log "Start bulk delete"
Write-Log "****************************************************************"
foreach($item in ($global:dgBulkDeleteObjects.ItemsSource | Where Selected -eq $true))
foreach($item in ($global:dgBulkDeleteObjects.ItemsSource | Where Selected -eq $true | sort-object -property @{e={$_.ObjectType.ImportOrder}} -Descending))
{
Write-Log "----------------------------------------------------------------"
Write-Log "Delete $($item.ObjectType.Title) objects"
@@ -2060,8 +2111,8 @@ function Show-GraphBulkDeleteForm
try
{
Write-Status "Get $($item.Title) objects" -Force
$objects = @(Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType)
Write-Status "Get $($item.ObjectType.Title) objects" -Force
[array]$objects = Get-GraphObjects -property $item.ObjectType.ViewProperties -objectType $item.ObjectType
foreach($obj in $objects)
{
$objName = Get-GraphObjectName $obj.Object $obj.ObjectType
@@ -2071,7 +2122,7 @@ function Show-GraphBulkDeleteForm
continue
}
Write-Status "Delete $($item.Title): $objName" -Force -SkipLog
Write-Status "Delete $($item.ObjectType.Title): $objName" -Force -SkipLog
Remove-GraphObject $obj.Object $obj.ObjectType $folder
}
}
@@ -2113,7 +2164,7 @@ function Get-GraphFileObjects
}
else
{
$graphObj = (ConvertFrom-Json (Get-Content -LiteralPath $file.FullName -Raw))
$graphObj = Get-GraphObjectFromFile $file.FullName
}
$obj = New-Object PSObject -Property @{
@@ -2189,7 +2240,7 @@ function Import-GraphFile
}
}
function Reset-GraphObjet
function Reset-GraphObject
{
param($fileObj, $objectList)
@@ -2364,10 +2415,12 @@ function Import-GraphObjectAssignment
if($preConfig["Import"] -eq $false) { return } # Assignment managed manually so skip further processing
$api = ?? $preConfig["API"] "$($objectType.API)/$($newObj.Id)/assign"
$api = ?? $preConfig["API"] "$($objectType.API)/$($obj.Id)/assign"
$method = ?? $preConfig["Method"] "POST"
$clonedAssignments = ?? $preConfig["Assignments"] $clonedAssignments
$keepProperties = ?? $objectType.AssignmentProperties @("target")
$keepTargetProperties = ?? $objectType.AssignmentTargetProperties @("@odata.type","groupId","deviceAndAppManagementAssignmentFilterId","deviceAndAppManagementAssignmentFilterType")
@@ -2412,8 +2465,7 @@ function Import-GraphObjectAssignment
if($objectType.PostImportAssignmentsCommand)
{
& $objectType.PostImportAssignmentsCommand $obj $objectType $fromFile $objAssign
}
}
}
#endregion
@@ -2567,7 +2619,7 @@ function Add-GroupMigrationObject
if(-not $groupObj)
{
# Get group info
$groupObj = Invoke-GraphRequest "/groups/$groupId" -ODataMetadata "none"
$groupObj = Invoke-GraphRequest "/groups/$groupId" -ODataMetadata "none" -NoError
}
if($groupObj)
@@ -2582,9 +2634,13 @@ function Add-GroupMigrationObject
$grouspPath = Join-Path $path "Groups"
if(-not (Test-Path $grouspPath)) { mkdir -Path $grouspPath -Force -ErrorAction SilentlyContinue | Out-Null }
$fileName = "$grouspPath\$((Remove-InvalidFileNameChars $groupObj.displayName)).json"
ConvertTo-Json $groupObj -Depth 50 | Out-File $fileName -Force
Save-GraphObjectToFile $groupObj $fileName
}
}
else
{
Write-Log "No group found with ID $($groupId). It might be deleted." 2
}
}
function Add-GraphMigrationObject
@@ -2621,7 +2677,7 @@ function Add-GraphMigrationObject
$grouspPath = Join-Path $path "Groups"
if(-not (Test-Path $grouspPath)) { mkdir -Path $grouspPath -Force -ErrorAction SilentlyContinue | Out-Null }
$fileName = "$grouspPath\$((Remove-InvalidFileNameChars $graphObj.displayName)).json"
ConvertTo-Json $graphObj -Depth 50 | Out-File $fileName -Force
Save-GraphObjectToFile $graphObj $fileName
}
}
}
@@ -2764,7 +2820,7 @@ function Get-GraphMigrationObjectsFromFile
{
# ToDo: Create group from Json (could be a dynamic group)
# Warn if synched group
$groupObj = (Get-Content -LiteralPath $groupFi.FullName) | ConvertFrom-Json
$groupObj = Get-GraphObjectFromFile $groupFi.FullName
#isAssignableToRole - For Role assignment groupd.
$keepProps = @("displayName","description","mailEnabled","mailNickname","securityEnabled","membershipRule","groupTypes", "membershipRuleProcessingState")
@@ -3012,7 +3068,7 @@ function Export-GraphObject
[switch]$SkipAddID,
[switch]$PassThru)
if(-not $exportFolder) { return }
if(-not $exportFolder -or -not $objToExport -or -not $objectType) { return }
Write-Status "Export $((Get-GraphObjectName $objToExport $objectType))"
@@ -3052,7 +3108,7 @@ function Export-GraphObject
}
$fullPath = ([IO.Path]::Combine($exportFolder, (Remove-InvalidFileNameChars "$($fileName).json")))
$obj | ConvertTo-Json -Depth 50 | Out-File -LiteralPath $fullPath -Force
Save-GraphObjectToFile $obj $fullPath
if($objectType.PostExportCommand)
{
@@ -3085,12 +3141,11 @@ function Set-GraphNavigationPropertiesFromFile
}
# Reload data from file. Some object properties was removed before import...
$objFileInfo = (ConvertFrom-Json (Get-Content -LiteralPath $navPropObject.File.FileInfo.FullName -Raw))
$objFileInfo = Get-GraphObjectFromFile $navPropObject.File.FileInfo.FullName
if(-not ($objFileInfo.PSObject.Properties | Where { $_.Name -like "#CustomRef_*" })) { return }
Set-GraphNavigationProperties $navPropObject.ImportedObject $objFileInfo $navPropObject.File.ObjectType
}
function Set-GraphNavigationProperties
@@ -3252,6 +3307,7 @@ function Get-GraphBatchObjects
$batchArr = @()
$batchTotal = 0
$objectType = $null
foreach($obj in $objects)
{
$objectType = $obj.ObjectType
@@ -3441,9 +3497,18 @@ function Import-GraphObject
$json = Update-JsonForEnvironment $json
}
if($global:Organization.Id)
{
$json = $json -replace "%OrganizationId%",$global:Organization.Id
}
$newObj = (Invoke-GraphRequest -Url $strAPI -Content $json -HttpMethod $method @params)
if($newObj -and $method -eq "POST")
if($newObj -is [Boolean] -and $newObj -and $method -eq "PATCH")
{
$newObj = (Get-GraphObject -obj $obj -objectType $objectType -SkipAssignments).Object
}
elseif($newObj -and $method -eq "POST")
{
Write-Log "$($objectType.Title) object imported successfully with id: $($newObj.Id)"
}
@@ -4103,3 +4168,132 @@ function Get-GraphEntityTypeProperties
$properties
}
function Get-GraphObjectFromFile
{
param($fileName)
if(-not $fileName) { return }
if([System.IO.File]::Exists($fileName) -eq $false)
{
Write-LogDebug "File $fileName not found" 2
return
}
$json = Get-Content -LiteralPath $fileName -Raw
if($global:Organization.Id)
{
$json = $json -replace "%OrganizationId%",$global:Organization.Id
}
try
{
$json | ConvertFrom-Json
}
catch
{
Write-LogError "Failed to convert json file $fileName" $_.Exception
}
}
function Save-GraphObjectToFile
{
param($obj, $fileName)
$json = $obj | ConvertTo-Json -Depth 50
if($global:Organization.Id)
{
$json = $json -replace $global:Organization.Id, "%OrganizationId%"
}
try
{
$json | Out-File -LiteralPath $fileName -Force -ErrorAction Stop
}
catch
{
Write-LogError "Failed to save file $fileName" $_.Exception
}
}
function Get-GraphObjectFile
{
param($obj, $objectType, $path)
$fileName = (Get-GraphObjectName $obj $objectType)
if((Get-SettingValue "AddIDToExportFile") -eq $true -and $obj.Id)
{
$fileName = ($fileName + "_" + $obj.Id)
}
$fileName = "$((Remove-InvalidFileNameChars $fileName)).json"
if($path)
{
$fileName = "$path\$fileName"
}
$fileName
}
function Confirm-GraphMatchFilter
{
param($graphObj, [string]$filter)
if(-not $filter.Trim()) { return $true }
$filterScope = ""
if($filter -like "scope:*" -or $filter -like "tag:*")
{
$filterScope = $filter.Split(':')[1]
}
$objName = Get-GraphObjectName $graphObj.Object $graphObj.ObjectType
if($filterScope)
{
if(($graphObj.Object.PSObject.Properties | Where Name -eq "roleScopeTagIds"))
{
$scopeTagProperty = "roleScopeTagIds"
}
elseif(($graphObj.Object.PSObject.Properties | Where Name -eq "roleScopeTags"))
{
$scopeTagProperty = "roleScopeTags"
}
else
{
Write-Log "$objName excluded based on Scope(Tags) not supported on $($graphObj.ObjectType.GroupId) objects"
continue
}
if(-not $script:scopeTags -and $script:offlineDocumentation -ne $true)
{
$script:scopeTags = (Invoke-GraphRequest -Url "/deviceManagement/roleScopeTags").Value
}
$found = $false
foreach($scopeTagId in $graphObj.Object."$scopeTagProperty")
{
$scopeTagObj = $script:scopeTags | Where Id -eq $scopeTagId
if($scopeTagObj -and $filterScope -and $scopeTagObj.displayName -match [RegEx]::Escape($filterScope))
{
return $true
}
}
if($found -eq $false)
{
Write-Log "$objName excluded based on no Scope(Tags) found that matches the filter"
return $false
}
}
else
{
if($objName -and $filter -and $objName -notmatch [RegEx]::Escape($filter))
{
Write-Log "$objName excluded based on the name does not match the filter"
return $false
}
}
return $true
}
+19 -13
View File
@@ -103,13 +103,11 @@ The script can import the exported json files in multiple ways.
Each application type works differently. Update functionality has been tested on Win32, Windows MSI LoB, iOS Store, Microsoft Store and Microsoft 365 (Windows and MacOS).
**WARNING:** Use Replace with caution! Replace will delete the existing object after a new object is imported and the assignments are copied, but it could cause issues in the environment if something in the process goes wrong. Replacing single objects can break references e.g. replacing an Application can break AutoPilot profiles, App Protection and App Configuration policies. Verify the process in a test environment before using this!
**WARNING:** Use Replace with caution! Replace will delete the existing object after a new object is imported and the assignments are copied, but it could cause issues in the environment if something in the process goes wrong. Replacing single objects can break references e.g. replacing an Application can break AutoPilot profiles, App Protection and App Configuration policies. Verify the process in a test environment before using this!
**Recommendation:** Backup all policies before running Replace/Update.
The Replace/Update feature can be used in a scenario where all profiles/policies are managed in a separate reference (Dev/Test) and then implemented in one or more destination environment. The existing objects will then be reset to have the same settings as the reference environment
**Note:** This must be turned on in Settings by enabling the **Allow update on import (Preview)** setting.
The Replace/Update feature can be used in a scenario where all profiles/policies are managed in a separate reference (Dev/Test) and then implemented in one or more destination environments. The existing objects will then be reset to have the same settings as the reference environment
## Comparison
@@ -174,9 +172,11 @@ See [ADMX Import](ADMXImport.md) for more information about the ADMX tools
Custom columns is supported. The script will by default add id, displayName and description with exception for some object types. These are configured in the EndpointManager.ps1 and EndpointManagerInfo.psm1 files.
Custom columns can be added for each Object Type. This must be added manually into the registry, in HKCU\SOFTWARE\CloudAPIPowerShellManagement\EndpointManager\ObjectColumns\\*ObjectType*.
Custom columns can be added for each Object Type in the detealed view of an Object.
The *ObjectType* value represents the ViewItem ID specified in the EndpointManager.ps1 and EndpointManagerInfo.psm1 files. This is also the same as the parent folder when items are exported.
Custom Columuns settings are stored in the regitry, in HKCU\SOFTWARE\CloudAPIPowerShellManagement\EndpointManager\ObjectColumns\\*ObjectType*.
The *ObjectType* value represents the ViewItem ID specified in the EndpointManager.ps1 and EndpointManagerInfo.psm1 files. This is also the same as the parent folder when items are exported.
The REG_SZ value has the following syntax:
@@ -191,9 +191,7 @@ PropertyX - Property to display. View an object to see available properties
HeaderX - Optional value for the column header. Property name will be used if this is not specified.
**Note:** Some object types returns multiple object types, @OData.Type. If a custom column is added but the property does not exist on all the object types that were returned, the columns will be empty. The code will **not** break if the property is missing on one or more returned objects.
The script does not require a restart. Columns are generated when the object type is selected in the menu.
**Note:** Some object types returns multiple object types, @OData.Type. If a custom column is added but the property does not exist on all the object types that were returned, the column value will be empty. The code will **not** break if the property is missing on one or more returned objects.
**Example 1:**
Reg key: HKCU\SOFTWARE\CloudAPIPowerShellManagement\EndpointManager\ObjectColumns\DeviceConfiguration
@@ -242,9 +240,10 @@ Start-WithJson.cmd is included as an example on how to start the script with jso
**Note:** If the file can't be created, the script will revert back registry. Make sure that the script can write to the file. It is not recommended to store the file in a folder that requires UAC to get write permissions.
## Supported Intune objects
* ADMX Files [^1]
* App Configurations (App and Device)
* App Protection
* Applications
* Applications [^2]
* Apple Enrolment Types - NOT fully tested
* Autopilot profiles
* Baseline Security profiles
@@ -253,7 +252,7 @@ Start-WithJson.cmd is included as an example on how to start the script with jso
* Conditional Access
* Custom Attributes
* Device Configuration (Administrative Templates, Configuration Policies, Android OEM Config, Settings Catalog)
* Endpoint Security (Account Protection, Disk Encryption, Firewall, Security Baselines etc.)
* Endpoint Security (Account Protection, Disk Encryption, Firewall, Security Baselines etc.) [^3]
* Enrollment Restrictions
* Enrollment Status Page profiles
* Feature Updates
@@ -264,6 +263,7 @@ Start-WithJson.cmd is included as an example on how to start the script with jso
* Notifications
* Policy Sets
* Quality Updates
* Reusable Settings
* Role Definitions
* Scope Tags
* Scripts (PowerShell and Shell scripts, supports download of script)
@@ -272,6 +272,9 @@ Start-WithJson.cmd is included as an example on how to start the script with jso
* Update Policies
* Co-management Settings
[^1]: ADMX file must be located in the export folder or in the folder defined in Settings. Administrative Template policies based on ADMX files must be imported after the ADMX file is imported.
[^2]: Export is support but .intunewin files will not be exported. The .intunewin file must exist in the exported folder or in the folder defined in Settings -> App packages folder.
[^3]: Some Endpoint Security policies will be exported to the SettingsCatalg since they are based the Settings Catalog API.
**Note:** The scripts are using the BETA version of the Graph API which might change at any time.
@@ -296,7 +299,7 @@ Start-WithJson.cmd is included as an example on how to start the script with jso
* [Microsoft.WindowsAPICodePack](https://www.nuget.org/packages/Microsoft-WindowsAPICodePack-Core) and [Microsoft.WindowsAPICodePack.Shell](https://www.nuget.org/packages/Microsoft-WindowsAPICodePack-Shell) for Browse Folder dialogs
## Acknowledgments
The app encryption and upload is based on [Graph PowerShell Intune Examples](https://github.com/microsoftgraph/powershell-intune-samples)
The app encryption and upload is based on [Graph PowerShell Intune Examples](https://github.com/microsoftgraph/powershell-intune-samples)<br />
Some MSAL functionalities are based on [MSAL.PS Module](https://github.com/AzureAD/MSAL.PS)
## Known Issues
@@ -318,10 +321,13 @@ Issue fixed in 3.3.2
Logout will only clear the token from cache and not from the browser e.g. if login is triggered after a logout, the user will still be listed in the 'Select user' dialog.
Referenced settings will NOT be imported/copied. There is no value stored in a property on the object for these settings. Example: A VPN profile has certificates as referenced properties. The certificates must be added manually after import/copy.
~~Referenced settings will NOT be imported/copied. There is no value stored in a property on the object for these settings. Example: A VPN profile has certificates as referenced properties. The certificates must be added manually after import/copy.~~
Issue fixed in 3.5.0
Terms of Use requires that the pdf file is available. This must be manually coped to either the Export folder for Terms of Use or to the Intune Application folder specified in Settings. It is currently not possible to export the pdf file with Graph API.
The ADMX/ADML files must be manually copied to either the Export folder for Administrative Templates or to the Intune Application folder specified in Settings. It is currently not possible to export the pdf file with Graph API.
See [Documentation](Documentation.md) for issues regarding the documentation process.
## TIP
+141 -4
View File
@@ -1,4 +1,143 @@
# Release Notes
## 3.8.1 - 2023-01-26
**New features**
- **Added support for Reusable Settings objects**<br />
- These are used by some of the Endpoint Security polices like Firewall rules<br />
Based on private request<br />
Note: No documentation support yet<br />
- **Added support for custom Authentication Strengths objects**<br />
- These can be used in Conditional Access policies<br />
Based on [Issue 109](https://github.com/Micke-K/IntuneManagement/issues/109)<br />
Note: Not all issues in 109 are fixed yet and no documentation support yet<br />
- **Export/Import**<br />
- PowerShell files for Health Scripts exported to the Export folder<br />
- PowerShell files for Application Detection scripts are exported to the Export folder<br />
Both scripts exports are based on [Issue 103](https://github.com/Micke-K/IntuneManagement/issues/103)<br />
- **Documentation**<br />
- Documentation engine completely rewritten for Settings Catalog and had major updates for other object types<br />
Please create an issue if there are any problems<br />
- Added support for HTML output<br />
- MD output is now official with included support for CSS and single file Output.<br />
Based on [Issue 35](https://github.com/Micke-K/IntuneManagement/issues/35)<br />
- Added support for indent on sub-properties so it will be visible that a property is set based on a parent<br />
Based on [Discussion 90](https://github.com/Micke-K/IntuneManagement/discussions/90)<br />
- Added option to skip assignments in the documentation<br />
Based on [Issue 102](https://github.com/Micke-K/IntuneManagement/issues/102)<br />
- Moved some Output options to generic output settings; Document scripts and Remove script signature<br />
- **Generic**<br />
- Added new property on applications, InstallerType. This can be added as a new column to the View for Applications.<br />
It specifies the New Microsoft Store App type; UWP or Win32<br />
Based on [Issue 101](https://github.com/Micke-K/IntuneManagement/issues/101)<br />
- Added response information f an API call failed. The log should now have a better description on why an API failed.<br />
**Fixes**
- **Documentation**<br />
- Lots of documentation issues fixed by the new Documentation engine<br />
- Sections and policies should now be in correct alphabetic order<br />
Based on [Discussion 90](https://github.com/Micke-K/IntuneManagement/discussions/90)<br />
- Fixed issues with assignments for Setting Catalog issues<br />
Based on [Issue 102](https://github.com/Micke-K/IntuneManagement/issues/102)<br />
- Translation files re-generated<br />
- Fixed error message: "Invoke-WordTranslateColumnHeader is not recognized as the name of a cmdlet"
Based on [Issue 99](https://github.com/Micke-K/IntuneManagement/issues/99)<br />
- **Authentication**<br />
- Fixed an issue when authentication to China Cloud<br />
Based on [Issue 106](https://github.com/Micke-K/IntuneManagement/issues/106)<br />
<br />
## 3.7.4 - 2022-11-17
**Fixes**
Lots of these issues are based on [Issue 94](https://github.com/Micke-K/IntuneManagement/issues/94)<br />
Thank you **Dominique** for all the amazing help with testing!<br />
- **Import/Export**<br />
- Added support for Export of TermsOfUse PDF files<br />
Based on [Issue 27](https://github.com/Micke-K/IntuneManagement/issues/27)<br />
- Fixed an issue where it failed to import .intunewin files during bulk import<br />
- Fixed issue with importing Edge app assignments<br />
- Changed the order for Bulk delete to make sure policies are deleted in the correct order<br />
- Lots of logging fixes for Bulk Export - Logged error when exporting object types not used<br />
- Business Store Apps will not be delete - Not supported<br />
- No import of assignments for default policies (Enrollment Status Page and Enrolment Restrictions)<br />
- Lots of logging fixes for Bulk Delete - Errors if deleting default policies, trying to delete object types that were not used etc.<br />
- **Documentation**<br />
- Added intent for Win32 Assignments<br />
Based on [Issue 98](https://github.com/Micke-K/IntuneManagement/issues/98)<br />
- Fixed an error when documenting Assignments for Win32 apps - Invoke-WordTranslateColumnHeader was missing/removed<br />
Based on [Issue 99](https://github.com/Micke-K/IntuneManagement/issues/99)<br />
<br />
- **Logging**<br />
- Added additional response error information if it failed to call a Graph API<br />
- Missing groups will now only generate a warning instead of Graph API error<br />
- No error for users without a profile photo<br />
<br />
<br />
## 3.7.3 - 2022-10-24
**Fixes**
- **Import**<br />
- Fixed a bug where it failed to import Endpoint Security policies<br />
- Fixed an issue where it failed to import Assignment Filters. A new property was added that is not supported during the import<br />
<br />
<br />
## 3.7.2 - 2022-10-08
**New features**
- **Added support for ADMX Files (Preview)**<br />
- First version of supporting the ADMX file import<br />
- Support for export/import policies based on ADMX files<br />
The import/export between environments is very tricky so please report any issues<br />
**Note**: The ADMX/ADML files must be copied to the app package folder or the policy exported folder<br />
The ADMX files imported is based on last modify date. This will make sure files are imported in the correct order eg Mozilla and Firefox ADMX files<br />
Based on [Issue 84](https://github.com/Micke-K/IntuneManagement/issues/84)<br />
- **Added support for value output type when documenting Administrative Templates**<br />
- Select Output value in the Documentation form. _Value with label_ will add the label when documenting sub-properties<br />
- **Translate TenantID when migrating policies between environment**<br />
- Any policy with a Tenant ID value will be translated when importing to a new environment<br />
Based on [Discussion 83](https://github.com/Micke-K/IntuneManagement/discussions/83)<br />
**Fixes**
- **Authentication**<br />
- Fixed an issue when auhencating with certificates during batch jobs<br />
Fixed by @cstaubli. Thank you!<br />
Based on [Issue 85](https://github.com/Micke-K/IntuneManagement/issues/85)<br />
- **Export\Import Fixes**<br />
- Fixed an issue when importing Microsoft Apps files and the default document format was not set<br />
Based on [Issue 92](https://github.com/Micke-K/IntuneManagement/issues/92)<br />
- **Documentation**<br />
- Fixed the order of sub-properties when documenting Administrative Templates<br />
- Fixed an issue where some xml values were not documented eg taskbar xml
- Translation files re-generated<br />
<br />
<br />
## 3.7.1 - 2022-08-08
**Fixes**
@@ -13,8 +152,8 @@
This level is used during bulk documentation and a group has more than one object type<br />
Eg. The Conditional Access group documents Conditional Access, Named Locations and Terms of Use<br />
The document will now have one section for each object type as third header level<br /><br />
This could break documentation if a custom word template is used, and it does not have a 3 level header named 'Heading 3'<br />
Specify the name of the 'Header 3 style' value in the Word settings before importing<br />
This could break documentation if a custom word template is used, and it does not have a third level header named 'Heading 3'<br />
Specify the name of the 'Header 3 style' value in the Word settings before documenting<br />
**New features**
@@ -55,7 +194,6 @@
<br />
<br />
# Release Notes
## 3.6.0 - 2022-06-29
**New features**
@@ -99,7 +237,6 @@
<br />
# Release Notes
## 3.5.0 - 2022-04-26
**New features**
+59 -16
View File
@@ -19,6 +19,8 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -33,7 +35,7 @@
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the targeted object type for the documentation" />
</StackPanel>
<ComboBox Name="cbDocumentationType" Margin="0,5,0,0" MinWidth="250" Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
DisplayMemberPath="Name" SelectedValuePath="Value" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="1">
<Label Content="Language" />
@@ -55,24 +57,18 @@
<ComboBox Name="cbDocumentationObjectSeparator" Margin="0,5,0,0" Width="100" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="4">
<Label Content="Set unconfigured value" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the unconfigured value if the propery is not configured and the property definition has an unconfigured value set" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="7" Grid.ColumnSpan="2" Name="spDocumentFilter">
<Label Content="Filter" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Filter policies by name or Scope (Tag)" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='4' Name='chkSetUnconfiguredValue' VerticalAlignment="Center" IsChecked="true" />
<TextBox Text="" Name="txtDocumentFilter" Padding="0,2,0,2" Grid.Row='8' Margin="5,0,0,0" Grid.ColumnSpan="2" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="5">
<Label Content="Set default value" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the default value if the propery is not configured and the property definition has a default value configured" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='5' Name='chkSetDefaultValue' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="6" Grid.ColumnSpan="2" Name="spDocumentFromFolder">
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="9" Grid.ColumnSpan="2" Name="spDocumentFromFolder">
<Label Content="Source files" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Create documentation from exported files" />
</StackPanel>
<Grid Grid.Row='7' Margin="5,0,0,0" Grid.ColumnSpan="2" Name="grdDocumentFromFolder">
<Grid Grid.Row='10' Margin="5,0,0,0" Grid.ColumnSpan="2" Name="grdDocumentFromFolder">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
@@ -81,11 +77,10 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtDocumentFromFolder" />
<TextBox Text="" Name="txtDocumentFromFolder" Padding="0,2,0,2" />
<Button Grid.Column="2" Name="browseDocumentFromFolder" Padding="5,0,5,0" Width="50" ToolTip="Browse for export folder">...</Button>
</Grid>
<Label Content="Objects to document" Grid.Row="0" Grid.Column="4" />
<DataGrid Name="grdDocumentObjects" Grid.Row="1" Grid.RowSpan="99" Grid.Column="4" CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White" Margin="0,0,5,0">
<!--
@@ -115,6 +110,9 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -133,7 +131,7 @@
<Label Content="Skip unconfigured properties" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude properties that are empty or set to 'Not configured'" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='1' Name='chkSkipNotConfigured' VerticalAlignment="Center" IsChecked="true" />
<CheckBox Grid.Column='1' Grid.Row='1' Name='chkSkipNotConfigured' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="2">
<Label Content="Skip default values" />
@@ -146,6 +144,51 @@
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude properties that are marked as disabled. If this is NOT checked, dispabled properties will still be excluded if the same EntityKey is used on an enabled property" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='3' Name='chkSkipDisabled' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="4">
<Label Content="Output value" />
<Rectangle Style="{DynamicResource InfoIcon}">
<Rectangle.ToolTip>
<TextBlock>
Specifys the output value for subproperties in Administrative Template policies<LineBreak />
<Bold>Value</Bold>: Documents only the value<LineBreak />
<Bold>Value with label</Bold>: Documents the sub-property value with the label of the property<LineBreak />
<Bold>Note</Bold>: This is only supported on Administrative Templates for the moment<LineBreak />
</TextBlock>
</Rectangle.ToolTip>
</Rectangle>
</StackPanel>
<ComboBox Name="cbDocumentationValueOutputProperty" Margin="0,5,0,0" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" DisplayMemberPath="Name" SelectedValuePath="Value" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="5">
<Label Content="Set unconfigured value" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the unconfigured value if the propery is not configured and the property definition has an unconfigured value set" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='5' Name='chkSetUnconfiguredValue' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="6">
<Label Content="Set default value" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the default value if the propery is not configured and the property definition has a default value configured" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='6' Name='chkSetDefaultValue' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='7' Margin="0,5,5,0">
<Label Content="Document scripts" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Include scripts in the documentation" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='7' Name='chkIncludeScripts' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='8' Margin="0,5,5,0">
<Label Content="Remove script signature" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Remove signature block from PowerShell scripts to reduce script documentation size" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='8' Name='chkExcludeScriptSignature' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='9' Margin="0,5,5,0">
<Label Content="Skip Assignments" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude assignments from the documentation" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='9' Name='chkExcludeAssignments' VerticalAlignment="Center" IsChecked="true" />
</Grid>
<Label Name="lblCustomOptions" Grid.Row="1" Margin="0,10,5,0" />
+82
View File
@@ -0,0 +1,82 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="grdWordOptions">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row='0' Margin="0,0,5,0">
<Label Content="Document name" />
<Rectangle Style="{DynamicResource InfoIcon}">
<Rectangle.ToolTip>
<TextBlock>
Full path to the name of the output file<LineBreak />
Default value is %MyDocuments%\%Organization%-%Date%.HTML<LineBreak />
Special folders and environmentvariables can be used
</TextBlock>
</Rectangle.ToolTip>
</Rectangle>
</StackPanel>
<Grid Grid.Column='1' Grid.Row='0' Margin="0,5,5,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtHTMLDocumentName" />
<Button Grid.Column="2" Name="browseHTMLDocumentName" Padding="5,0,5,0" Width="50" ToolTip="Select output document">...</Button>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row='1' Margin="0,0,5,0">
<Label Content="CSS Style" />
<Rectangle Style="{DynamicResource InfoIcon}">
<Rectangle.ToolTip>
<TextBlock>
Species the CSS file used for styling the HTML document.<LineBreak />
The CSS file will be ingected to the output document<LineBreak />
Default value is %ScriptRoot%\Documentation\DefaultHTMLStyle.css
</TextBlock>
</Rectangle.ToolTip>
</Rectangle>
</StackPanel>
<Grid Grid.Column='1' Grid.Row='1' Margin="0,5,5,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtHTMLCSSFile" />
<Button Grid.Column="2" Name="browseHTMLCSSFile" Padding="5,0,5,0" Width="50" ToolTip="Browse for CSS file">...</Button>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row='2' Margin="0,0,5,0">
<Label Content="Open document" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="This will open the document when finished" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='2' Name='chkHTMLOpenDocument' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='3' Margin="0,5,5,0" >
<Label Content="Output File" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the targeted file for the documentation. One single file for all objects or one file per object." />
</StackPanel>
<ComboBox Name="cbHTMLDocumentOutputFile" Margin="0,5,0,0" MinWidth="250" Grid.Row='3' Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
</Grid>
+88
View File
@@ -0,0 +1,88 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="grdWordOptions">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row='0' Margin="0,0,5,0">
<Label Content="Document name" />
<Rectangle Style="{DynamicResource InfoIcon}">
<Rectangle.ToolTip>
<TextBlock>
Full path to the name of the output file<LineBreak />
Default value is %MyDocuments%\%Organization%-%Date%.md<LineBreak />
Special folders and environmentvariables can be used
</TextBlock>
</Rectangle.ToolTip>
</Rectangle>
</StackPanel>
<Grid Grid.Column='1' Grid.Row='0' Margin="0,5,5,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtMDDocumentName" />
<Button Grid.Column="2" Name="browseMDDocumentName" Padding="5,0,5,0" Width="50" ToolTip="Select output document">...</Button>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row='1' Margin="0,0,5,0">
<Label Content="Include CSS" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify if the CSS document shouldbe added to the MD file(s)" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='1' Name='chkMDIncludeCSS' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='2' Margin="0,0,5,0">
<Label Content="CSS Style" />
<Rectangle Style="{DynamicResource InfoIcon}">
<Rectangle.ToolTip>
<TextBlock>
Species the CSS file used for styling the MD document.<LineBreak />
The CSS file will be ingected to the output document<LineBreak />
Default value is %ScriptRoot%\Documentation\DefaultMDStyle.css
</TextBlock>
</Rectangle.ToolTip>
</Rectangle>
</StackPanel>
<Grid Grid.Column='1' Grid.Row='2' Margin="0,5,5,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtMDCSSFile" />
<Button Grid.Column="2" Name="browseMDCSSFile" Padding="5,0,5,0" Width="50" ToolTip="Browse for CSS file">...</Button>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row='3' Margin="0,0,5,0">
<Label Content="Open document" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="This will open the document when finished" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='3' Name='chkMDOpenDocument' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='4' Margin="0,5,5,0" >
<Label Content="Output File" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the targeted file for the documentation. One single file for all objects or one file per object." />
</StackPanel>
<ComboBox Name="cbMDDocumentOutputFile" Margin="0,5,0,0" MinWidth="250" Grid.Row='4' Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
</Grid>
-12
View File
@@ -240,18 +240,6 @@
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='20' Name='chkWordOpenDocument' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='21' Margin="0,0,5,0">
<Label Content="Document scripts" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Include scripts in the documentation" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='21' Name='chkWordIncludeScripts' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='22' Margin="0,0,5,0">
<Label Content="Remove script signature" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Remove signature block from PowerShell scripts to reduce script documentation size" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='22' Name='chkWordExcludeScriptSignature' VerticalAlignment="Center" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='23' Margin="0,0,5,0">
<Label Content="Attach Json file" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Attach the Json file to the documentation" />