├── AddTranslation.md
├── Images
├── Translate-Manuals-1.png
├── Translate-Manuals-2.png
└── Translate-Manuals-3.png
├── LICENSE
├── Logo
└── IntuneDocumentationLogo.png
├── PSModule
├── IntuneDocumentation
│ ├── Data
│ │ ├── LabelTranslation
│ │ │ ├── #microsoft.graph.androidGeneralDeviceConfiguration.json
│ │ │ ├── #microsoft.graph.azureADWindowsAutopilotDeploymentProfile.json
│ │ │ ├── #microsoft.graph.deviceEnrollmentLimitConfiguration.json
│ │ │ ├── #microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration.json
│ │ │ ├── #microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration.json
│ │ │ ├── #microsoft.graph.iosGeneralDeviceConfiguration.json
│ │ │ ├── #microsoft.graph.iosScepCertificateProfile.json
│ │ │ ├── #microsoft.graph.iosTrustedRootCertificate.json
│ │ │ ├── #microsoft.graph.sharedPCConfiguration.json
│ │ │ ├── #microsoft.graph.windows10EndpointProtectionConfiguration.json
│ │ │ ├── #microsoft.graph.windows10EnrollmentCompletionPageConfiguration.json
│ │ │ ├── #microsoft.graph.windows81SCEPCertificateProfile.json
│ │ │ ├── #microsoft.graph.windows81TrustedRootCertificate.json
│ │ │ ├── #microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration.json
│ │ │ ├── #microsoft.graph.windowsDeliveryOptimizationConfiguration.json
│ │ │ ├── #microsoft.graph.windowsDomainJoinConfiguration.json
│ │ │ ├── #microsoft.graph.windowsHealthMonitoringConfiguration.json
│ │ │ ├── #microsoft.graph.windowsIdentityProtectionConfiguration.json
│ │ │ ├── #microsoft.graph.windowsKioskConfiguration.json
│ │ │ ├── #microsoft.graph.windowsUpdateForBusinessConfiguration.json
│ │ │ ├── #microsoft.graph.windowsWifiConfiguration.json
│ │ │ ├── PartnerConfiguration.json
│ │ │ └── applePushNotificationCertificate.json
│ │ ├── Template.docx
│ │ └── Template.md
│ ├── Functions
│ │ ├── Invoke-ConditionalAccessDocumentation.ps1
│ │ ├── Invoke-IntuneDocumentation.ps1
│ │ └── New-IntuneDocumentationAppRegistration.ps1
│ ├── Internal
│ │ ├── Add-Header.ps1
│ │ ├── Add-ScriptText.ps1
│ │ ├── Add-Table.ps1
│ │ ├── Add-Text.ps1
│ │ ├── Convert-CamelCaseToDisplayName.ps1
│ │ ├── ConvertTo-MD.ps1
│ │ ├── Format-MsGraphData.ps1
│ │ ├── Get-ADMXBasedConfigurationProfile.ps1
│ │ ├── Get-ADMXBasedConfigurationProfile_Assignment.ps1
│ │ ├── Get-AzureADApplicationName.ps1
│ │ ├── Get-AzureADRole.ps1
│ │ ├── Get-AzureADUser.ps1
│ │ ├── Get-ConditionalAccess.ps1
│ │ ├── Get-ConfigurationProfileBeta.ps1
│ │ ├── Get-DeviceManagementScript.ps1
│ │ ├── Get-DeviceManagementScript_Assignment.ps1
│ │ ├── Get-EnrollmentStatusPage.ps1
│ │ ├── Get-EnrollmentStatusPage_Assignment.ps1
│ │ ├── Get-MAM_Android_Assignment.ps1
│ │ ├── Get-MAM_Windows_Assignment.ps1
│ │ ├── Get-MAM_iOS_Assignment.ps1
│ │ ├── Get-ManagedAppConfig_Assignment.ps1
│ │ ├── Get-MobileAppsBeta.ps1
│ │ ├── Get-SecBaselinesBeta.ps1
│ │ ├── Get-WindowsAutopilotConfig.ps1
│ │ ├── Invoke-PrintAssignmentDetail.ps1
│ │ ├── Invoke-PrintAssignmentDetail_Assignment.ps1
│ │ ├── Invoke-PrintGroup.ps1
│ │ ├── Invoke-PrintTable.ps1
│ │ ├── Invoke-PrintTableNormal.ps1
│ │ ├── Invoke-PrintTableTranslate.ps1
│ │ ├── Invoke-TransponseObject.ps1
│ │ ├── Set-AzureADAppPermission.ps1
│ │ ├── Update-Text.ps1
│ │ └── Write-Log.ps1
│ ├── IntuneDocumentation.psd1
│ └── IntuneDocumentation.psm1
├── build.ps1
└── test.ps1
├── README.md
└── ReleaseNotes.md
/AddTranslation.md:
--------------------------------------------------------------------------------
1 | # Add translations
2 |
3 | When using the parameter UseTranslationBeta the api names will be translated to the labels used in the Intune Portal. Some of the Intune Configuration Profiles are not translated due to high effort which is needed to do this. But you can help translating them and make the project better for everybody.
4 |
5 | | Image | Description |
6 | |--- |--- |
7 | |
|Open one of the displayed json files which are displayed after you generated the documentations. If this is not displayed, then manually check the Data directory in the PowerShell module directory. |
8 | |
|Specify the Name and section of each api propert name by copying the labels from the Intune Console. All names have to be in english. If a you can't associate a property with label, then leave the Name attribute in the json file just empty.|
9 | | |Save the file|
10 | |
|Create a new documentation and check if the result is as expected. if no, go back to step 2.|
11 | | |Submit your file to the project by pusing it via git or send via one of my social media channels (Whatever is simpler for you).|
12 |
--------------------------------------------------------------------------------
/Images/Translate-Manuals-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/Images/Translate-Manuals-1.png
--------------------------------------------------------------------------------
/Images/Translate-Manuals-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/Images/Translate-Manuals-2.png
--------------------------------------------------------------------------------
/Images/Translate-Manuals-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/Images/Translate-Manuals-3.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Logo/IntuneDocumentationLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/Logo/IntuneDocumentationLogo.png
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.androidGeneralDeviceConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.androidGeneralDeviceConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.azureADWindowsAutopilotDeploymentProfile.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.azureADWindowsAutopilotDeploymentProfile.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentLimitConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentLimitConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosGeneralDeviceConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosGeneralDeviceConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosScepCertificateProfile.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosScepCertificateProfile.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosTrustedRootCertificate.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.iosTrustedRootCertificate.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.sharedPCConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.sharedPCConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows10EndpointProtectionConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows10EndpointProtectionConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows10EnrollmentCompletionPageConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows10EnrollmentCompletionPageConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows81SCEPCertificateProfile.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows81SCEPCertificateProfile.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows81TrustedRootCertificate.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windows81TrustedRootCertificate.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDeliveryOptimizationConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDeliveryOptimizationConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDomainJoinConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsDomainJoinConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsHealthMonitoringConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsHealthMonitoringConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsIdentityProtectionConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsIdentityProtectionConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsKioskConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsKioskConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsUpdateForBusinessConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsUpdateForBusinessConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsWifiConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/#microsoft.graph.windowsWifiConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/PartnerConfiguration.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/PartnerConfiguration.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/LabelTranslation/applePushNotificationCertificate.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/LabelTranslation/applePushNotificationCertificate.json
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/Template.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThomasKur/IntuneDocumentation/277cf291dbbd7dbfda807dd908b5dc61c4a94513/PSModule/IntuneDocumentation/Data/Template.docx
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Data/Template.md:
--------------------------------------------------------------------------------
1 | # SYSTEM Documentation
2 |
3 | Generated on: DATE
4 |
5 | TENANT
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Functions/Invoke-ConditionalAccessDocumentation.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-ConditionalAccessDocumentation(){
2 | <#
3 | .DESCRIPTION
4 | This Script documents an Conditional Access with almost all settings, which are available over the Graph API.
5 |
6 | The Script is using the PSWord and Microsoft.Graph.Intune Module. Therefore you have to install them first.
7 |
8 | .PARAMETER FullDocumentationPath
9 | Path including filename where the documentation should be created. The filename has to end with .docx.
10 | Note:
11 | If there is already a file present, the documentation witt be added at the end of the existing document.
12 |
13 | .PARAMETER UseTranslationBeta
14 | When using this parameter the API names will be translated to the labels used in the Intune Portal.
15 | Note:
16 | These Translations need to be created manually, only a few are translated yet. If you are willing
17 | to support this project. You can do this by translating the json files which are mentioned to you when
18 | you generate the documentation in your tenant.
19 |
20 | .PARAMETER ClientSecret
21 | If the client secret is set, app-only authentication will be performed using the client ID specified by
22 | the AppId environment parameter.
23 |
24 | .PARAMETER ClientId
25 | The client id of the application registration with the required permissions.
26 |
27 | .PARAMETER Tenant
28 | Name of your tenant in form of "kurcontoso.onmicrosoft.com" or the TenantId
29 |
30 | .EXAMPLE Non interactive
31 | Invoke-ConditionalAccessDocumentation -FullDocumentationPath c:\temp\IntuneDoc.docx -ClientId d5cf6364-82f7-4024-9ac1-73a9fd2a6ec3 -ClientSecret S03AESdMlhLQIPYYw/cYtLkGkQS0H49jXh02AS6Ek0U= -Tenant d873f16a-73a2-4ccf-9d36-67b8243ab99a
32 |
33 | .NOTES
34 | Author: Thomas Kurth/baseVISION
35 | Date: 26.7.2020
36 |
37 | History
38 | See Release Notes in Github.
39 |
40 | #>
41 | [alias("Invoke-CADocumentation")]
42 | [CmdletBinding()]
43 | Param(
44 | [ValidateScript({
45 | if($_ -notmatch "(\.(docx|md)$)"){
46 | throw "The file specified in the path argument must be of type docx or md"
47 | }
48 | return $true
49 | })]
50 | [Parameter(ParameterSetName = "NonInteractive")]
51 | [System.IO.FileInfo]$FullDocumentationPath = ".\IntuneDocumentation.docx",
52 |
53 | [Parameter(ParameterSetName = "NonInteractive")]
54 | [switch]$UseTranslationBeta,
55 |
56 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
57 | [String]$ClientId,
58 |
59 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
60 | [String]$ClientSecret,
61 |
62 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
63 | [String]$Tenant
64 |
65 | )
66 | ## Manual Variable Definition
67 | ########################################################
68 | #$DebugPreference = "Continue"
69 | $ScriptName = "DocumentCA"
70 | $Script:NewTranslationFiles = @()
71 | if($UseTranslationBeta){
72 | $Script:UseTranslation = $true
73 | } else {
74 | $Script:UseTranslation = $false
75 | }
76 | $format = if($FullDocumentationPath -match "(\.md)"){ "md" } else { "docx" }
77 |
78 | #region Initialization
79 | ########################################################
80 | Write-Log "Start Script $Scriptname"
81 | #region Authentication
82 |
83 | $authority = "https://login.windows.net/$Tenant"
84 | Update-MSGraphEnvironment -AppId $ClientId -Quiet
85 | Update-MSGraphEnvironment -AuthUrl $authority -Quiet
86 | Connect-MSGraph -ClientSecret $ClientSecret -Quiet
87 |
88 | #endregion
89 | #region Main Script
90 | ########################################################
91 | #region Save Path
92 |
93 | #endregion
94 | #region CopyTemplate
95 |
96 | if((Test-Path -Path $FullDocumentationPath)){
97 | Write-Log "File already exists, does not use built-in template." -Type Warn
98 | } else {
99 | Copy-Item "$PSScriptRoot\..\Data\Template.$format" -Destination $FullDocumentationPath
100 | Update-Text -format $format -SearchText "DATE" -NewText (Get-Date -Format "HH:mm dd.MM.yyyy")
101 | Update-Text -format $format -SearchText "SYSTEM" -NewText "Conditional Access"
102 | try{
103 | $org = Invoke-MSGraphRequest -Url /organization
104 | Update-Text -format $format -SearchText "TENANT" -NewText $org.value.displayName
105 | } catch{
106 | Update-Text -format $format -SearchText "TENANT" -NewText ""
107 | }
108 | }
109 | #endregion
110 | #region Document Conditional Access
111 | $ResultCAPolicies = @()
112 | $CAPolicies = Get-ConditionalAccess
113 | foreach($CAPolicy in $CAPolicies){
114 | Add-Header -level 1 -format $format -Text $CAPolicy.displayName
115 |
116 | $ResultCAPolicy = New-Object -Type PSObject
117 | $ResultCAPolicy | Add-Member Noteproperty "M_Id" $CAPolicy.id
118 | $ResultCAPolicy | Add-Member Noteproperty "M_DisplayName" $CAPolicy.displayName
119 | $ResultCAPolicy | Add-Member Noteproperty "M_Created" $CAPolicy.createdDateTime
120 | $ResultCAPolicy | Add-Member Noteproperty "M_Modified" $CAPolicy.modifiedDateTime
121 | $ResultCAPolicy | Add-Member Noteproperty "M_State" $CAPolicy.state
122 | $ResultCAPolicy | Add-Member Noteproperty "C_SignInRiskLevel" ($CAPolicy.conditions.signInRiskLevels -join ",")
123 | $ResultCAPolicy | Add-Member Noteproperty "C_ClientAppTypes" ($CAPolicy.conditions.clientAppTypes -join ",")
124 | $ResultCAPolicy | Add-Member Noteproperty "C_PlatformsInclude" ($CAPolicy.conditions.platforms.includePlatforms -join ",")
125 | $ResultCAPolicy | Add-Member Noteproperty "C_PlatformsExclude" ($CAPolicy.conditions.platforms.excludePlatforms -join ",")
126 | $ResultCAPolicy | Add-Member Noteproperty "C_LocationsInclude" ($CAPolicy.conditions.locations.includeLocations -join ",")
127 | $ResultCAPolicy | Add-Member Noteproperty "C_LocationsExclude" ($CAPolicy.conditions.locations.excludeLocations -join ",")
128 | $ResultCAPolicy | Add-Member Noteproperty "C_DeviceStates" ($CAPolicy.conditions.deviceStates -join ",")
129 | $ResultCAPolicy | Add-Member Noteproperty "C_Devices" ($CAPolicy.conditions.devices -join ",")
130 |
131 | # Application Condition
132 | $IncludeApps = @()
133 | foreach($app in $CAPolicy.conditions.applications.includeApplications){
134 | $IncludeApps += Get-AzureADApplicationName -AppId $app
135 | }
136 | $ResultCAPolicy | Add-Member Noteproperty "C_ApplicationsInclude" ($IncludeApps -join [System.Environment]::NewLine)
137 |
138 | $ExcludeApps = @()
139 | foreach($app in $CAPolicy.conditions.applications.excludeApplications){
140 | $ExcludeApps += Get-AzureADApplicationName -AppId $app
141 | }
142 | $ResultCAPolicy | Add-Member Noteproperty "C_ApplicationsExclude" ($ExcludeApps -join [System.Environment]::NewLine)
143 |
144 | $ResultCAPolicy | Add-Member Noteproperty "C_ApplicationsIncludeUserActions" ($CAPolicy.conditions.applications.includeUserActions -join ",")
145 |
146 | #User Conditions
147 | $IncludeUsers = @()
148 | foreach($user in $CAPolicy.conditions.users.includeUsers){
149 | $IncludeUsers += Get-AzureADUser -UserId $user
150 | }
151 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersInclude" ($IncludeUsers -join [System.Environment]::NewLine)
152 |
153 | $ExcludeUsers = @()
154 | foreach($user in $CAPolicy.conditions.users.excludeUsers){
155 | $ExcludeUsers += Get-AzureADUser -UserId $user
156 | }
157 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersExclude" ($ExcludeUsers -join [System.Environment]::NewLine)
158 |
159 | # Group Conditions
160 | $IncludeGroups = @()
161 | foreach($group in $CAPolicy.conditions.users.includeGroups){
162 | $IncludeGroups += (Get-AADGroup -groupid $group).displayName
163 | }
164 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersIncludeGroups" ($IncludeGroups -join [System.Environment]::NewLine)
165 |
166 | $ExcludeApps = @()
167 | foreach($group in $CAPolicy.conditions.users.excludeGroups){
168 | $ExcludeGroups += (Get-AADGroup -groupid $group).displayName
169 | }
170 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersExcludeGroups" ($ExcludeGroups -join [System.Environment]::NewLine)
171 |
172 | # Role Conditions
173 | $IncludeRoles = @()
174 | foreach($role in $CAPolicy.conditions.users.includeRoles){
175 | $IncludeRoles += Get-AzureADRole -RoleId $role
176 | }
177 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersIncludeRoles" ($IncludeRoles -join [System.Environment]::NewLine)
178 |
179 | $ExcludeApps = @()
180 | foreach($role in $CAPolicy.conditions.users.excludeRoles){
181 | $ExcludeRoles += Get-AzureADRole -RoleId $role
182 | }
183 | $ResultCAPolicy | Add-Member Noteproperty "C_UsersExcludeRoles" ($ExcludeRoles -join [System.Environment]::NewLine)
184 |
185 | $ResultCAPolicy | Add-Member Noteproperty "G_Operator" $CAPolicy.grantControls.operator
186 | $ResultCAPolicy | Add-Member Noteproperty "G_BuiltInControls" ($CAPolicy.grantControls.builtInControls -join ",")
187 | $ResultCAPolicy | Add-Member Noteproperty "G_CustomControls" ($CAPolicy.grantControls.customAuthenticationFactors -join ",")
188 | $ResultCAPolicy | Add-Member Noteproperty "G_TermsOfUse" ($CAPolicy.grantControls.termsOfUse -join ",")
189 | $ResultCAPolicy | Add-Member Noteproperty "S_ApplicationEnforcedRestriction" ($CAPolicy.sessionControls.applicationEnforcedRestrictions.isEnabled)
190 | $ResultCAPolicy | Add-Member Noteproperty "S_CloudAppSecurity" ($CAPolicy.sessionControls.cloudAppSecurity.isEnabled)
191 | $ResultCAPolicy | Add-Member Noteproperty "S_CloudAppSecurityType" ($CAPolicy.sessionControls.cloudAppSecurity.cloudAppSecurityTyp)
192 | $ResultCAPolicy | Add-Member Noteproperty "S_PersistentBrowser" ($CAPolicy.sessionControls.persistentBrowser.isEnabled)
193 | $ResultCAPolicy | Add-Member Noteproperty "S_PersistentBrowserMode" ($CAPolicy.sessionControls.persistentBrowser.mode)
194 | $ResultCAPolicy | Add-Member Noteproperty "S_SignInFrequency" ($CAPolicy.sessionControls.signInFrequency.isEnabled)
195 | $ResultCAPolicy | Add-Member Noteproperty "S_SignInFrequencyTimeframe" ("" + $CAPolicy.sessionControls.signInFrequency.value +" "+ $CAPolicy.sessionControls.signInFrequency.type)
196 |
197 | $ResultCAPolicies += $ResultCAPolicy
198 |
199 | Add-Header -level 2 -format $format -Text Metadata
200 | $ht2 = @{}
201 | $ResultCAPolicy.psobject.properties | Where-Object { $_.Name -like "M_*" } | ForEach-Object { $ht2[($_.Name.Replace("M_",""))] = ($(if($null -eq $_.Value){""}else{$_.Value})) }
202 | Add-Table -InputObject ($ht2.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
203 |
204 | Add-Header -level 2 -format $format -Text Conditions
205 | $ht2 = @{}
206 | $ResultCAPolicy.psobject.properties | Where-Object { $_.Name -like "C_*" } | ForEach-Object { $ht2[($_.Name.Replace("C_",""))] = ($(if($null -eq $_.Value){""}else{$_.Value})) }
207 | Add-Table -InputObject ($ht2.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
208 |
209 | Add-Header -level 2 -format $format -Text "Grant Controls"
210 | $ht2 = @{}
211 | $ResultCAPolicy.psobject.properties | Where-Object { $_.Name -like "G_*" } | ForEach-Object { $ht2[($_.Name.Replace("G_",""))] = ($(if($null -eq $_.Value){""}else{$_.Value})) }
212 | Add-Table -InputObject ($ht2.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
213 |
214 | Add-Header -level 2 -format $format -Text "Session Controls"
215 | $ht2 = @{}
216 | $ResultCAPolicy.psobject.properties | Where-Object { $_.Name -like "S_*" } | ForEach-Object { $ht2[($_.Name.Replace("S_",""))] = ($(if($null -eq $_.Value){""}else{$_.Value})) }
217 | Add-Table -InputObject ($ht2.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
218 | }
219 | $CsvPath = $FullDocumentationPath -replace $format,"csv"
220 | $ResultCAPolicies | Invoke-TransposeObject | Export-Csv -Path $CsvPath -Delimiter ";" -NoTypeInformation -Force
221 |
222 |
223 | #endregion
224 |
225 | #endregion
226 | #region Finishing
227 | ########################################################
228 | if ($format -eq 'docx') {
229 | Write-Log "Press Ctrl + A and then F9 to Update the table of contents and other dynamic fields in the Word document."
230 | }
231 | if($Script:NewTranslationFiles.Count -gt 0 -and $Script:UseTranslation){
232 | Write-Log "You used the option to translate API properties. Some of the configurations of your tenant could not be translated because translations are missing." -Type Warn
233 | foreach($file in ($Script:NewTranslationFiles | Select-Object -Unique)){
234 | Write-Log " - $($file.Replace('Internal\..\',''))" -Type Warn
235 | }
236 | Write-Log "You can support the project by translating and submitting the files as issue on the project page. Then it will be included for the future." -Type Warn
237 | Write-Log "Follow the guide here https://github.com/ThomasKur/IntuneDocumentation/blob/master/AddTranslation.md" -Type Warn
238 | }
239 |
240 | Write-Log "End Script $Scriptname"
241 | #endregion
242 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Functions/Invoke-IntuneDocumentation.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-IntuneDocumentation(){
2 | <#
3 | .DESCRIPTION
4 | This Script documents an Intune Tenant with almost all settings, which are available over the Graph API.
5 | NOTE: This no longer does Conditional Access
6 | The Script is using the PSWord and Microsoft.Graph.Intune Module. Therefore you have to install them first.
7 |
8 |
9 |
10 | .PARAMETER FullDocumentationPath
11 | Path including filename where the documentation should be created. The filename has to end with .docx.
12 | Note:
13 | If there is already a file present, the documentation will be added at the end of the existing document.
14 |
15 | .PARAMETER UseTranslationBeta
16 | When using this parameter the API names will be translated to the labels used in the Intune Portal.
17 | Note:
18 | These Translations need to be created manually, only a few are translated yet. If you are willing
19 | to support this project. You can do this by translating the json files which are mentioned to you when
20 | you generate the documentation in your tenant.
21 |
22 | .PARAMETER ClientSecret
23 | If the client secret is set, app-only authentication will be performed using the client ID specified by
24 | the AppId environment parameter.
25 |
26 | .PARAMETER ClientId
27 | The client id of the application registration with the required permissions.
28 |
29 | .PARAMETER Tenant
30 | Name of your tenant in form of "kurcontoso.onmicrosoft.com" or the TenantId
31 |
32 |
33 | .EXAMPLE Interactive
34 | Invoke-IntuneDocumentation -FullDocumentationPath c:\temp\IntuneDoc.docx
35 |
36 | .EXAMPLE Non interactive
37 | Invoke-IntuneDocumentation -FullDocumentationPath c:\temp\IntuneDoc.docx -ClientId d5cf6364-82f7-4024-9ac1-73a9fd2a6ec3 -ClientSecret S03AESdMlhLQIPYYw/cYtLkGkQS0H49jXh02AS6Ek0U= -Tenant d873f16a-73a2-4ccf-9d36-67b8243ab99a
38 |
39 | .NOTES
40 | Author: Thomas Kurth/baseVISION
41 | Co-Author: jflieben
42 | Co-Author: Robin Dadswell
43 | Date: 26.7.2020
44 |
45 | History
46 | See Release Notes in Github.
47 |
48 | #>
49 | [CmdletBinding()]
50 | Param(
51 | [ValidateScript({
52 | if($_ -notmatch "(\.(docx|md)$)"){
53 | throw "The file specified in the path argument must be of type docx or md"
54 | }
55 | return $true
56 | })]
57 | [Parameter(ParameterSetName = "NonInteractive")]
58 | [Parameter(ParameterSetName = "Default")]
59 | [System.IO.FileInfo]$FullDocumentationPath = ".\IntuneDocumentation.docx",
60 |
61 | [Parameter(ParameterSetName = "Default")]
62 | [Parameter(ParameterSetName = "NonInteractive")]
63 | [switch]$UseTranslationBeta,
64 |
65 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
66 | [String]$ClientId,
67 |
68 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
69 | [String]$ClientSecret,
70 |
71 | [Parameter(Mandatory = $true, ParameterSetName = "NonInteractive")]
72 | [String]$Tenant
73 |
74 | )
75 | ## Manual Variable Definition
76 | ########################################################
77 | #$DebugPreference = "Continue"
78 | $ScriptName = "DocumentIntune"
79 | $Script:NewTranslationFiles = @()
80 | if($UseTranslationBeta){
81 | $Script:UseTranslation = $true
82 | } else {
83 | $Script:UseTranslation = $false
84 | }
85 | $format = if($FullDocumentationPath -match "(\.md)"){ "md" } else { "docx" }
86 |
87 | #region Initialization
88 | ########################################################
89 | Write-Log "Start Script $Scriptname"
90 | #region Authentication
91 | if($PsCmdlet.ParameterSetName -eq "NonInteractive"){
92 | $authority = "https://login.windows.net/$Tenant"
93 | Update-MSGraphEnvironment -AppId $ClientId -Quiet
94 | Update-MSGraphEnvironment -AuthUrl $authority -Quiet
95 | Connect-MSGraph -ClientSecret $ClientSecret -Quiet
96 | } else {
97 | Connect-MSGraph
98 | }
99 | #endregion
100 | #region Main Script
101 | ########################################################
102 | #region Save Path
103 |
104 | #endregion
105 | #region CopyTemplate
106 | if((Test-Path -Path $FullDocumentationPath)){
107 | Write-Log "File already exists, does not use built-in template." -Type Warn
108 | } else {
109 | Copy-Item "$PSScriptRoot\..\Data\Template.$format" -Destination $FullDocumentationPath
110 | Update-Text -format $format -SearchText "DATE" -NewText (Get-Date -Format "HH:mm dd.MM.yyyy")
111 | Update-Text -format $format -SearchText "SYSTEM" -NewText "Intune"
112 | try{
113 | $org = Invoke-MSGraphRequest -Url /organization
114 | Update-Text -format $format -SearchText "TENANT" -NewText $org.value.displayName
115 | } catch{
116 | Update-Text -format $format -SearchText "TENANT" -NewText ""
117 | }
118 |
119 | }
120 | #endregion
121 | #region Document Apps
122 | $Intune_Apps = @()
123 | $AppGroups = @()
124 | Get-MobileAppsBeta | ForEach-Object {
125 | $App_Assignment = Get-IntuneMobileAppAssignment -mobileAppId $_.id
126 | if($App_Assignment){
127 | $Intune_App = New-Object -Type PSObject
128 | $Intune_App | Add-Member Noteproperty "Publisher" $_.publisher
129 | $Intune_App | Add-Member Noteproperty "DisplayName" $_.displayName
130 | $Intune_App | Add-Member Noteproperty "Type" (Format-MsGraphData $_.'@odata.type')
131 | $Assignments = @()
132 | $newline = if ($format -eq 'md') { '
' } else { "`n" }
133 | foreach($Assignment in $App_Assignment) {
134 | if($null -ne $Assignment.target.groupId){
135 | $AppGroups += $Assignment.target.groupId
136 | $Assignments += "$((Get-AADGroup -groupid $Assignment.target.groupId).displayName)$newline - Intent:$($Assignment.intent)"
137 | } else {
138 | $Assignments += "$(($Assignment.target.'@odata.type' -replace "#microsoft.graph.",''))$newline - Intent:$($Assignment.intent)"
139 | }
140 | }
141 | $Intune_App | Add-Member Noteproperty "Assignments" ($Assignments -join $newline)
142 | $Intune_Apps += $Intune_App
143 | }
144 | }
145 | if($null -ne $Intune_Apps){
146 | Add-Header -level 1 -format $format -Text "Applications"
147 | Add-Table -InputObject ($Intune_Apps | Sort-Object Publisher,DisplayName) -format $format -AutoFitStyle Contents
148 | if($null -ne $AppGroups){
149 | Add-Header -level 1 -format $format -Text "Groups used to assign apps"
150 | Invoke-PrintGroup -GroupIds $AppGroups
151 | }
152 | }
153 |
154 | #endregion
155 | #region Document App protection policies
156 | $MAMs = Get-IntuneAppProtectionPolicy | Where-Object { $_.'@odata.type' -notlike "*AppConfiguration" }
157 |
158 | if($null -ne $MAMs){
159 | Add-Header -level 1 -format $format -Text "App Protection Policies"
160 | foreach($MAM in $MAMs){
161 | write-Log "App Protection Policy: $($MAM.displayName)"
162 | Add-Header -level 2 -format $format -Text $MAM.displayName
163 | if($MAM.'@odata.type' -eq "#microsoft.graph.mdmWindowsInformationProtectionPolicy"){
164 | $MAM.protectedApps = $MAM.protectedApps.displayName -join ", "
165 | }
166 | Invoke-PrintTable -Properties $MAM.psobject.properties -TypeName $MAM.'@odata.type'
167 | if($MAM.'@odata.type' -eq "#microsoft.graph.iosManagedAppProtection"){
168 | $MAMA = Get-MAM_iOS_Assignment -policyId $MAM.id
169 | }
170 | if($MAM.'@odata.type' -eq "#microsoft.graph.androidManagedAppProtection"){
171 | $MAMA = Get-MAM_Android_Assignment -policyId $MAM.id
172 | }
173 | if($MAM.'@odata.type' -eq "#microsoft.graph.mdmWindowsInformationProtectionPolicy"){
174 | $MAMA = Get-MAM_Windows_Assignment -policyId $MAM.id
175 | }
176 | Invoke-PrintAssignmentDetail -Assignments $MAMA
177 | }
178 | }
179 | #endregion
180 | #region Document App configuration policies
181 | $MACs = Get-IntuneAppProtectionPolicy | Where-Object { $_.'@odata.type' -like "*AppConfiguration" }
182 | if($null -ne $MACs){
183 | Add-Header -level 1 -format $format -Text "App Configuration Policies"
184 | foreach($MAC in $MACs){
185 | write-Log "App Configuration Policy: $($MAC.displayName)"
186 | Add-Header -level 2 -format $format -Text $MAC.displayName
187 | Invoke-PrintTable -Properties $MAC.psobject.properties -TypeName $MAC.'@odata.type'
188 | $MACA = Get-ManagedAppConfig_Assignment -policyId $MAC.id
189 | Invoke-PrintAssignmentDetail -Assignments $MACA
190 | }
191 | }
192 | #endregion
193 | #region Document Compliance Policies
194 | $DCPs = Get-IntuneDeviceCompliancePolicy
195 | if($null -ne $DCPs){
196 | Add-Header -level 1 -format $format -Text "Compliance Policies"
197 | foreach($DCP in $DCPs){
198 | write-Log "Device Compliance Policy: $($DCP.displayName)"
199 | Add-Header -level 2 -format $format -Text $DCP.displayName
200 | if([String]::IsNullOrWhiteSpace($DCP.'@odata.type') -eq $false){
201 | Invoke-PrintTable -Properties $DCP.psobject.properties -TypeName $DCP.'@odata.type'
202 | $id = $DCP.id
203 | $DCPA = Get-IntuneDeviceCompliancePolicyAssignment -deviceCompliancePolicyId $id
204 | Invoke-PrintAssignmentDetail -Assignments $DCPA
205 | }
206 |
207 | }
208 | }
209 | #endregion
210 | #region Security Baselines
211 | $SBs = Get-SecBaselinesBeta
212 | if($null -ne $SBs){
213 | Add-Header -level 1 -format $format -Text "Security Baselines"
214 | foreach($SB in $SBs){
215 | write-Log "Security Baselines Policy: $($SB.displayName)"
216 | Add-Header -level 2 -format $format -Text $SB.Name
217 | # $SB.Settings | Add-WordTable -FilePath $FullDocumentationPath -AutoFitStyle Window -Design LightListAccent2
218 | Invoke-PrintTable -Properties $SB.Settings -TypeName $SB.'@odata.type'
219 | Invoke-PrintAssignmentDetail -Assignments $SB.Assignments
220 | }
221 | }
222 | #endregion
223 | #region Document T&C
224 | write-Log "Terms and Conditions"
225 | $GAndTs = Get-IntuneTermsAndConditions
226 | if($null -ne $GAndTs){
227 | Add-Header -level 1 -format $format -Text "Terms and Conditions"
228 | foreach($GAndT in $GAndTs){
229 | Add-Header -level 2 -format $format -Text $GAndT.displayName
230 | Add-Table -InputObject ($GAndT | Select-Object -Property id,@{Name="Created at";Expression={$_.createdDateTime}},@{Name="Modified at";Expression={$_.lastModifiedDateTime}},@{Name="Displayname";Expression={$_.displayName}},@{Name="Title";Expression={$_.title}},@{Name="Version";Expression={$_.version}}) -format $format -AutoFitStyle Contents
231 | $DCPA = Get-DeviceManagement_TermsAndConditions_Assignments -termsAndConditionId $GAndT.id
232 | Invoke-PrintAssignmentDetail -Assignments $DCPA
233 | }
234 | }
235 | #endregion
236 |
237 | #region Document Device Configurations
238 | Add-Header -level 1 -format $format -Text "Device Configuration"
239 | $DCPs = Get-ConfigurationProfileBeta
240 | foreach($DCP in $DCPs){
241 | write-Log "Device Compliance Policy: $($DCP.displayName)"
242 | Add-Header -level 2 -format $format -Text $DCP.displayName
243 | Invoke-PrintTable -Properties $DCP.psobject.properties -TypeName $DCP.'@odata.type'
244 | $id = $DCP.id
245 | $DCPA = Get-IntuneDeviceConfigurationPolicyAssignment -deviceConfigurationId $id
246 | Invoke-PrintAssignmentDetail -Assignments $DCPA
247 | }
248 | $ADMXPolicies = Get-ADMXBasedConfigurationProfile
249 | foreach($ADMXPolicy in $ADMXPolicies){
250 | write-Log "Device Configuration (ADMX): $($ADMXPolicy.DisplayName)"
251 | Add-Header -level 2 -format $format -Text $ADMXPolicy.DisplayName
252 | Add-Table -InputObject $ADMXPolicy.Settings -format $format
253 |
254 | $DCPA = Get-ADMXBasedConfigurationProfile_Assignment -ADMXBasedConfigurationProfileId $ADMXPolicy.Id
255 | Invoke-PrintAssignmentDetail -Assignments $DCPA
256 | }
257 | #endregion
258 | #region Device Management Scripts (PowerShell)
259 | Add-Header -level 1 -format $format -Text "Device Management Scripts"
260 | $PSScripts = Get-DeviceManagementScript
261 | foreach($PSScript in $PSScripts){
262 | Add-Header -level 2 -format $format -Text $PSScript.displayName
263 | $ht2 = @{}
264 | $PSScript.psobject.properties | ForEach-Object {
265 | if($_.Name -ne "scriptContent"){
266 | $ht2[(Format-MsGraphData $($_.Name))] = "$($_.Value)"
267 | }
268 | }
269 | Add-Table -InputObject ($ht2.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
270 | $DCPA = Get-DeviceManagementScript_Assignment -DeviceManagementScriptId $ht2.id
271 | Invoke-PrintAssignmentDetail -Assignments $DCPA
272 |
273 | Add-Header -level 3 -format $format -Text "Script"
274 | Add-ScriptText -format $format -Text ($PSScript.scriptContent -replace "`0", "")
275 | }
276 | #endregion
277 | #region AutoPilot Configuration
278 | $AutoPilotConfigs = Get-WindowsAutopilotConfig
279 | if($null -ne $AutoPilotConfigs){
280 | Add-Header -level 1 -format $format -Text "AutoPilot Configuration"
281 |
282 | foreach($APC in $AutoPilotConfigs){
283 | write-Log "AutoPilot Config: $($APC.displayName)"
284 | Add-Header -level 2 -format $format -Text $APC.displayName
285 | Invoke-PrintTable -Properties $APC.psobject.properties -TypeName $APC.'@odata.type'
286 | }
287 | }
288 | #endregion
289 |
290 | #region Enrollment Configuration
291 | $EnrollmentStatusPage = Get-EnrollmentStatusPage
292 | if($null -ne $EnrollmentStatusPage){
293 | Add-Header -level 1 -format $format -Text "Enrollment Configuration"
294 | foreach($ESP in $EnrollmentStatusPage){
295 | write-Log "Enrollment Status Page Config: $($ESP.displayName)"
296 | $ESPtype = $ESP.'@odata.type'
297 | switch($ESPtype){
298 | "#microsoft.graph.windows10EnrollmentCompletionPageConfiguration" { $ESPtype = "ESP" }
299 | "#microsoft.graph.deviceEnrollmentLimitConfiguration" { $ESPtype = "Enrollment Limit" }
300 | "#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration" { $ESPtype = "Platform Restrictions" }
301 | "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration" { $ESPtype = "Windows Hello for Business" }
302 | }
303 | Add-Header -level 2 -format $format -Text "$($ESPtype) - $($ESP.displayName)"
304 |
305 | Invoke-PrintTable -Properties $ESP.psobject.properties -TypeName $ESP.'@odata.type'
306 | $DCPA = Get-DeviceManagement_DeviceEnrollmentConfigurations_Assignments -deviceEnrollmentConfigurationId $ESP.id
307 | Invoke-PrintAssignmentDetail -Assignments $DCPA
308 | }
309 | }
310 | #endregion
311 |
312 | #region Custom Roles
313 | $CustomRoles = Get-DeviceManagement_RoleDefinitions | Where-Object { $_.isBuiltin -eq $false }
314 | if($null -ne $CustomRoles){
315 | Add-Header -level 1 -format $format -Text "Custom Roles"
316 | foreach($CustomRole in $CustomRoles){
317 | write-Log "Custom role: $($CustomRole.displayName)"
318 | Add-Header -level 2 -format $format -Text $CustomRole.displayName
319 | Add-Text -format $format -Text $CustomRole.rolePermissions.resourceActions.allowedResourceActions -Size 11
320 | }
321 | }
322 | #endregion
323 |
324 | #region Apple Push Certificate
325 | try{
326 | $VPPs = Get-IntuneVppToken -ErrorAction SilentlyContinue
327 | $APNs = Get-IntuneApplePushNotificationCertificate -ErrorAction SilentlyContinue
328 | } catch {
329 | Write-Log "Failed to load AppleAPN or VPP information"
330 | }
331 | Add-Header -level 1 -format $format -Text "Apple Configurations"
332 | Add-Header -level 2 -format $format -Text "Apple Push Certificate"
333 | foreach($APN in $APNs){
334 | write-Log "APN Config: $($APN.appleIdentifier)"
335 | Add-Header -level 3 -format $format -Text $APN.appleIdentifier
336 | Invoke-PrintTable -Properties $APN.psobject.properties -TypeName "applePushNotificationCertificate"
337 | }
338 | Add-Header -level 2 -format $format -Text "Apple VPP Tokens"
339 | foreach($VPP in $VPPs){
340 | write-Log "VPP Config: $($VPP.appleId)"
341 | Add-Header -level 3 -format $format -Text $VPP.appleId
342 | Invoke-PrintTable -Properties $VPP.psobject.properties -TypeName "appleVPPCertificate"
343 | }
344 | #endregion
345 |
346 | #region Device Categories
347 | $Cats = Get-IntuneDeviceCategory
348 | if($null -ne $Cats){
349 | Add-Header -level 1 -format $format -Text "Device Categories"
350 | write-Log "Device Categories: $($Cats.count)"
351 | foreach($Cat in $Cats){
352 | Add-Text -format $format -Text (" - " + $Cat.displayName)
353 | }
354 | }
355 | #endregion
356 |
357 | #region Exchange Connection
358 | $exch = Get-IntuneExchangeConnector
359 | if($null -ne $exch){
360 | Add-Header -level 1 -format $format -Text "Exchange Connector"
361 | write-Log "Exchange Connector: $($exch.serverName)"
362 | Invoke-PrintTable -Properties $exch.psobject.properties -TypeName "ExchangeConnector"
363 | }
364 | #endregion
365 |
366 | #region Partner Configuration
367 | $partnerConfigs = Get-IntuneDeviceManagementPartner
368 | if($null -ne $partnerConfigs){
369 | Add-Header -level 1 -format $format -Text "Partner Connections"
370 |
371 | foreach($partnerConfig in $partnerConfigs){
372 | write-Log "Partner Config: $($partnerConfig.displayName)"
373 | Add-Header -level 2 -format $format -Text $partnerConfig.displayName
374 | Invoke-PrintTable -Properties $partnerConfig.psobject.properties -TypeName "PartnerConfiguration"
375 | }
376 | }
377 | #endregion
378 | #endregion
379 | #region Finishing
380 | ########################################################
381 | if ($format -eq 'docx') {
382 | Write-Log "Press Ctrl + A and then F9 to Update the table of contents and other dynamic fields in the Word document."
383 | }
384 | if($Script:NewTranslationFiles.Count -gt 0 -and $Script:UseTranslation){
385 | Write-Log "You used the option to translate API properties. Some of the configurations of your tenant could not be translated because translations are missing." -Type Warn
386 | foreach($file in ($Script:NewTranslationFiles | Select-Object -Unique)){
387 | Write-Log " - $($file.Replace('Internal\..\',''))" -Type Warn
388 | }
389 | Write-Log "You can support the project by translating and submitting the files as issue on the project page. Then it will be included for the future." -Type Warn
390 | Write-Log "Follow the guide here https://github.com/ThomasKur/IntuneDocumentation/blob/master/AddTranslation.md" -Type Warn
391 | }
392 |
393 | Write-Log "End Script $Scriptname"
394 | #endregion
395 | }
396 |
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Functions/New-IntuneDocumentationAppRegistration.ps1:
--------------------------------------------------------------------------------
1 | Function New-IntuneDocumentationAppRegistration(){
2 | <#
3 | .DESCRIPTION
4 | This script will create an App registration(WPNinjas.eu Automatic Documentation) in Azure AD. Global Admin privileges are required during execution of this function. Afterwards the created clint secret can be used to execute the Intunde Documentation silently.
5 |
6 | .EXAMPLE
7 | $p = New-IntuneDocumentationAppRegistration
8 | $p | fl
9 |
10 | ClientID : d5cf6364-82f7-4024-9ac1-73a9fd2a6ec3
11 | ClientSecret : S03AESdMlhLQIPYYw/cYtLkGkQS0H49jXh02AS6Ek0U=
12 | ClientSecretExpiration : 21.07.2025 21:39:02
13 | TenantId : d873f16a-73a2-4ccf-9d36-67b8243ab99a
14 |
15 | .NOTES
16 | Author: Thomas Kurth/baseVISION
17 | Date: 21.7.2020
18 |
19 | History
20 | See Release Notes in Github.
21 |
22 | #>
23 | [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')]
24 | Param(
25 | [int]
26 | $TokenLifetimeDays = 365
27 | )
28 | ## Manual Variable Definition
29 | ########################################################
30 | #$DebugPreference = "Continue"
31 | $ScriptName = "DocumentIntuneAppRegistration"
32 |
33 |
34 | #region Initialization
35 | ########################################################
36 | Write-Log "Start Script $Scriptname"
37 |
38 | $AzureAD = Get-Module -Name AzureAD
39 | if($AzureAD){
40 | Write-Verbose -Message "AzureAD module is loaded."
41 | } else {
42 | Write-Warning -Message "AzureAD module is not loaded, please install by 'Install-Module AzureAD'."
43 | }
44 |
45 | #region Authentication
46 | Connect-AzureAD | Out-Null
47 | #endregion
48 | #region Main Script
49 | ########################################################
50 |
51 | $displayName = "WPNinjas.eu Automatic Documentation"
52 | $appPermissionsRequired = @('Policy.Read.All',
53 | 'Directory.Read.All',
54 | 'DeviceManagementServiceConfig.Read.All',
55 | 'DeviceManagementRBAC.Read.All',
56 | 'DeviceManagementManagedDevices.Read.All',
57 | 'DeviceManagementConfiguration.Read.All',
58 | 'DeviceManagementApps.Read.All',
59 | 'Device.Read.All',
60 | 'Agreement.Read.All',
61 | 'Application.Read.All')
62 | $targetServicePrincipalName = 'Microsoft Graph'
63 |
64 | if (!(Get-AzureADApplication -SearchString $displayName)) {
65 | $app = New-AzureADApplication -DisplayName $displayName `
66 | -Homepage "https://localhost" `
67 | -ReplyUrls "urn:ietf:wg:oauth:2.0:oob" `
68 | -PublicClient $true
69 |
70 |
71 | # create SPN for App Registration
72 | Write-Debug ('Creating SPN for App Registration {0}' -f $displayName)
73 |
74 | # create a password (spn key)
75 | $startDate = Get-Date
76 | $endDate = $startDate.AddDays($TokenLifetimeDays)
77 | $appPwd = New-AzureADApplicationPasswordCredential -ObjectId $app.ObjectId -CustomKeyIdentifier ((New-Guid).Guid.Replace("-","").subString(0, 30)) -StartDate $startDate -EndDate $endDate
78 |
79 | # create a service principal for your application
80 | # you need this to be able to grant your application the required permission
81 | $spForApp = New-AzureADServicePrincipal -AppId $app.AppId -PasswordCredentials @($appPwd)
82 | Set-AzureADAppPermission -targetServicePrincipalName $targetServicePrincipalName -appPermissionsRequired $appPermissionsRequired -childApp $app -spForApp $spForApp
83 |
84 | } else {
85 | Write-Debug ('App Registration {0} already exists' -f $displayName)
86 | $app = Get-AzureADApplication -SearchString $displayName
87 | $spForApp = Get-AzureADServicePrincipal -SearchString $app.AppId
88 | # create a password (spn key)
89 | $startDate = Get-Date
90 | $endDate = $startDate.AddDays($TokenLifetimeDays)
91 | $appPwd = New-AzureADApplicationPasswordCredential -ObjectId $app.ObjectId -CustomKeyIdentifier ((New-Guid).Guid.Replace("-","").subString(0, 30)) -StartDate $startDate -EndDate $endDate
92 | Set-AzureADAppPermission -targetServicePrincipalName $targetServicePrincipalName -appPermissionsRequired $appPermissionsRequired -childApp $app -spForApp $spForApp -ErrorAction SilentlyContinue
93 |
94 | }
95 |
96 |
97 |
98 |
99 | #endregion
100 | #region Finishing
101 | ########################################################
102 | [PSCustomObject]@{
103 | ClientID = $app.AppId
104 | ClientSecret = $appPwd.Value
105 | ClientSecretExpiration = $appPwd.EndDate
106 | TenantId = (Get-AzureADCurrentSessionInfo).TenantId
107 | }
108 |
109 | Write-Log "End Script $Scriptname"
110 | #endregion
111 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Add-Header.ps1:
--------------------------------------------------------------------------------
1 | function Add-Header {
2 | <#
3 | .SYNOPSIS
4 | This function is used to add a header in the documentation.
5 | .EXAMPLE
6 | Add-Header -format 'md' -Text "Assignments" -level 2
7 | Adds Assignments as a 2nd level heading in the 'md' format file at $FullDocumentationPath
8 | .NOTES
9 | NAME: Add-Header
10 | #>
11 | param(
12 | [Parameter(Mandatory = $true)]
13 | [String]$format,
14 |
15 | [Parameter(Mandatory = $true)]
16 | [String]$Text,
17 |
18 | [Parameter(HelpMessage = "Please choose a heading level between 1 and 6")]
19 | [ValidateRange(1, 6)]
20 | [int32]$level
21 | )
22 |
23 | if ($format -eq 'md') {
24 | # For markdown we already used a H1 for the doc Title, so to ensure proper header order
25 | # add 1 to the given header level
26 | "$('#' * ($level + 1)) $Text`r`n" | Out-File -FilePath $FullDocumentationPath -Append -Encoding utf8
27 | } else {
28 | Add-WordText -FilePath $FullDocumentationPath -Heading "Heading$level" -Text $Text
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Add-ScriptText.ps1:
--------------------------------------------------------------------------------
1 | function Add-ScriptText {
2 | <#
3 | .SYNOPSIS
4 | This function is used to add script content in the documentation.
5 | .EXAMPLE
6 | Add-ScriptText -format 'docx' -Text "Write-Log $Value"
7 | Adds the text 'Write-Log $Value' formatted as code in the 'docx' format file at $FullDocumentationPath
8 | .NOTES
9 | NAME: Add-ScriptText
10 | #>
11 | param(
12 | [Parameter(Mandatory = $true)]
13 | [String]$format,
14 |
15 | [Parameter(Mandatory = $true)]
16 | [String]$Text
17 | )
18 | if ($format -eq 'md') {
19 | '```' + "`r`n$Text`r`n" + '```' | Out-File -FilePath $FullDocumentationPath -Append -Encoding utf8
20 | } else {
21 | Add-WordText -FilePath $FullDocumentationPath -Text $Text -Size 10 -Italic -FontFamily "Courier New"
22 | }
23 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Add-Table.ps1:
--------------------------------------------------------------------------------
1 | function Add-Table {
2 | <#
3 | .SYNOPSIS
4 | This function is used to add a table using an Object as input in the documentation.
5 | .EXAMPLE
6 | Add-Table -InputObject $Properties -format 'md'
7 | Converts the $Properties object to a Markdown formatted table and adds to the 'md' format file at $FullDocumentationPath
8 | .NOTES
9 | NAME: Add-Table
10 | #>
11 | param(
12 | [Parameter(
13 | Mandatory = $true,
14 | ValueFromPipeline = $true
15 | )]
16 | [PSObject[]]$InputObject,
17 |
18 | [Parameter(Mandatory = $true)]
19 | [String]$format,
20 |
21 | [Parameter(Mandatory = $false)]
22 | [String]$AutoFitStyle = 'Window'
23 | )
24 | process {
25 | if ($format -eq 'md') {
26 | ConvertTo-MD ($InputObject) | Out-File -FilePath $FullDocumentationPath -Append -Encoding utf8
27 | } else {
28 | $InputObject | Add-WordTable -FilePath $FullDocumentationPath -AutoFitStyle $AutoFitStyle -Design LightListAccent2
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Add-Text.ps1:
--------------------------------------------------------------------------------
1 |
2 | function Add-Text {
3 | <#
4 | .SYNOPSIS
5 | This function is used to add a line of text in the documentation.
6 | .EXAMPLE
7 | Add-Text -format 'docx' -Text "Display Name"
8 | Adds the text 'Display Name' in the 'docx' format file at $FullDocumentationPath
9 | .NOTES
10 | NAME: Add-Text
11 | #>
12 | param(
13 | [Parameter(Mandatory = $true)]
14 | [String]$format,
15 |
16 | [Parameter(Mandatory = $true)]
17 | [String]$Text,
18 |
19 | [Parameter(Mandatory=$false, HelpMessage = "Please choose a font size between 4 and 72")]
20 | [ValidateRange(4, 72)]
21 | [Int32]$Size
22 | )
23 | if ($format -eq 'md') {
24 | $Text | Out-File -FilePath $FullDocumentationPath -Append -Encoding utf8
25 | } else {
26 | Add-WordText -FilePath $FullDocumentationPath -Text $Text -Size $Size
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Convert-CamelCaseToDisplayName.ps1:
--------------------------------------------------------------------------------
1 | Function Convert-CamelCaseToDisplayName(){
2 | <#
3 | .SYNOPSIS
4 | This function to convert camel case to normal case
5 | .DESCRIPTION
6 | This function to convert camel case to normal case
7 | .EXAMPLE
8 | Convert-CamelCaseToDisplayName -Value "androidOsRestriction"
9 | Returns "Android Os Restriction"
10 | .NOTES
11 | NAME: Convert-CamelCaseToDisplayName
12 | #>
13 | [cmdletbinding()]
14 | param
15 | (
16 | [Parameter(Mandatory=$true)]
17 | $Value
18 | )
19 | $newString = ""
20 | if(([String]$Value).Contains(' ')){
21 | # If string already contains spaces don't change
22 | $newString = $value
23 | } else {
24 | $stringChars = $value.GetEnumerator()
25 | $charIndex = 0
26 | $lastUpper = $false
27 | foreach ($char in $stringChars) {
28 | # If upper and not first character, add a space
29 | if ([char]::IsUpper($char) -eq "True" -and $charIndex -gt 0 -and $lastUpper -eq $false) {
30 | $newString = $newString + " " + $char.ToString()
31 | $lastUpper = $true
32 | } elseif ($charIndex -eq 0) {
33 | # If the first character, make it a capital always
34 | $newString = $newString + $char.ToString().ToUpper()
35 | $lastUpper = $true
36 | } else {
37 | $newString = $newString + $char.ToString()
38 | if([char]::IsUpper($char) -eq "True"){
39 | $lastUpper = $true
40 | }else {
41 | $lastUpper = $false
42 | }
43 | }
44 | $charIndex++
45 | }
46 | }
47 | return $newString
48 |
49 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/ConvertTo-MD.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .SYNOPSIS
3 | Converts a PowerShell object to a Markdown table. Based on ConvertTo-Markdown from https://github.com/ishu3101/PSMarkdown with added support
4 | for multiple rows.
5 | .DESCRIPTION
6 | The ConvertTo-MD function converts a Powershell Object to a Markdown formatted table
7 | .EXAMPLE
8 | Get-Process | Where-Object {$_.mainWindowTitle} | Select-Object ID, Name, Path, Company | ConvertTo-MD
9 | This command gets all the processes that have a main window title, and it displays them in a Markdown table format with the process ID, Name, Path and Company.
10 | .EXAMPLE
11 | ConvertTo-MD (Get-Date)
12 | This command converts a date object to Markdown table format
13 | .EXAMPLE
14 | Get-Alias | Select Name, DisplayName | ConvertTo-MD
15 | This command displays the name and displayname of all the aliases for the current session in Markdown table format
16 | #>
17 | Function ConvertTo-MD {
18 | [CmdletBinding()]
19 | [OutputType([string])]
20 | Param (
21 | [Parameter(
22 | Mandatory = $true,
23 | Position = 0,
24 | ValueFromPipeline = $true
25 | )]
26 | [PSObject[]]$InputObject
27 | )
28 |
29 | Begin {
30 | $items = @()
31 | $columns = @{}
32 | }
33 |
34 | Process {
35 | ForEach($item in $InputObject) {
36 | $items += $item
37 | $item.PSObject.Properties | ForEach-Object {
38 | if($null -ne $_.Value){
39 | if(-not $columns.Contains($_.Name) -or $columns[$_.Name] -lt $_.Value.ToString().Length) {
40 | $columns[$_.Name] = $_.Value.ToString().Length
41 | }
42 | }
43 | }
44 | }
45 | }
46 |
47 | End {
48 | ForEach($key in $($columns.Keys)) {
49 | $columns[$key] = [Math]::Max($columns[$key], $key.Length)
50 | }
51 |
52 | $header = @()
53 | ForEach($key in $columns.Keys) {
54 | $header += ('{0,-' + $columns[$key] + '}') -f $key
55 | }
56 | [string]$HeaderToReturn = '| ' + ( $header -join ' | ' ) + ' |'
57 |
58 | $separator = @()
59 | ForEach($key in $columns.Keys) {
60 | $separator += '-' * $columns[$key]
61 | }
62 | [string]$SeparatorToReturn = '| ' + ( $separator -join ' | ' ) + ' |'
63 |
64 | [string]$ValuesToReturn = ""
65 |
66 | ForEach($item in $items) {
67 | $values = @()
68 | ForEach($key in $columns.Keys) {
69 | $values += ('{0,-' + $columns[$key] + '}') -f $item.($key)
70 | }
71 | $ValuesToReturn += '| ' + ( $values -join ' | ' ) + ' |' + "`r`n"
72 | }
73 | return [string]([string]::Concat($HeaderToReturn, "`n", $SeparatorToReturn, "`n", $ValuesToReturn))
74 | }
75 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Format-MsGraphData.ps1:
--------------------------------------------------------------------------------
1 | Function Format-MsGraphData(){
2 | <#
3 | .SYNOPSIS
4 | This function Cleansup Values Returned By Microsoft Graph
5 | .DESCRIPTION
6 | This function Cleansup Values Returned By Microsoft Graph
7 | .EXAMPLE
8 | Format-MsGraphData -Value "@Odata.Type"
9 | Returns "Type"
10 | .NOTES
11 | NAME: Format-MsGraphData
12 | #>
13 | [cmdletbinding()]
14 | param
15 | (
16 | [Parameter(Mandatory=$false)]
17 | [AllowEmptyString()]
18 | [AllowNull()]
19 | $Value
20 | )
21 | $DateTimeRegex = "\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}Z"
22 | if($value -is [array]){
23 | $value = $value -join ","
24 | }
25 | [string]$value = "$value"
26 | $Value = $Value -replace "#microsoft.graph.",""
27 | $Value = $Value -replace "windows","win"
28 | $Value = $Value -replace "StoreforBusiness","SfB"
29 | $Value = $Value -replace "@odata.",""
30 | if($null -ne $Value -and $Value -match "@{*"){
31 | $Value = $Value -replace "@{",""
32 | $Value = $Value -replace "}",""
33 | $Value = $Value -replace ";",""
34 | }
35 | if($Value -match $DateTimeRegex){
36 | try{
37 | [DateTime]$Date = ([DateTime]::Parse($Value))
38 | $Value = "$($Date.ToShortDateString()) $($Date.ToShortTimeString())"
39 | } catch {
40 | Write-Log "Cannot parse data" -Type Warn
41 | }
42 | }
43 | return $value
44 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-ADMXBasedConfigurationProfile.ps1:
--------------------------------------------------------------------------------
1 | Function Get-ADMXBasedConfigurationProfile(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the ADMX Policies from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Intune ADMX Configuration
7 | .EXAMPLE
8 | Get-ADMXBasedConfigurationProfile
9 | Returns the ADMX based Configuration Profiles configured in Intune
10 | .NOTES
11 | NAME: Get-ADMXBasedConfigurationProfile
12 | #>
13 | try {
14 |
15 | $Policies = Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/groupPolicyConfigurations"
16 | $return = @()
17 | foreach($Policy in $Policies.value){
18 | $return2 = @()
19 | $values = Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/groupPolicyConfigurations/$($Policy.Id)/definitionValues"
20 | foreach($value in $values.value){
21 | try{
22 | $definition = (Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/groupPolicyConfigurations/$($Policy.Id)/definitionValues/$($value.id)/definition")
23 | $res = Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/groupPolicyConfigurations/$($Policy.Id)/definitionValues/$($value.id)/presentationValues"
24 | if($null -ne $res.value.Value){
25 | $AdditionalConfig = if($res.value.value.GetType().baseType.Name -eq "Array"){ $res.value.value -join ", " } else { $res.value.value }
26 | } else {
27 | $AdditionalConfig = ""
28 | }
29 | $return2 += [PSCustomObject]@{
30 | DisplayName = $definition.displayName
31 | #ExplainText = $definition.explainText
32 | Scope = $definition.classType
33 | Path = $definition.categoryPath
34 | SupportedOn = $definition.supportedOn
35 | State = if($value.enabled -eq $true){"Enabled"} else {"Disabled"}
36 | Value = $AdditionalConfig
37 | }
38 | } catch {
39 | Write-Log -Message "Error reading ADMX setting" -Type Warn -Exception $_.Exception
40 | }
41 | }
42 | $return += [PSCustomObject]@{
43 | DisplayName = $Policy.displayName
44 | Id = $Policy.id
45 | Settings = $return2
46 | }
47 | }
48 | return $return
49 | } catch {
50 | Write-Log "Response content:`n$responseBody" -Type Error
51 | Write-Log "Failed to get ADMX based Intune Policies." -Type Error -Exception $_.Exception
52 | }
53 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-ADMXBasedConfigurationProfile_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-ADMXBasedConfigurationProfile_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the ADMX Policy Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Intune ADMX Configuration Assignments
7 | .EXAMPLE
8 | Get-ADMXBasedConfigurationProfile_Assignment -ADMXBasedConfigurationProfileId $id
9 | Returns the ADMX based Configuration Profile Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-ADMXBasedConfigurationProfile_Assignment
12 | #>
13 | param(
14 | $ADMXBasedConfigurationProfileId
15 | )
16 | try {
17 | $Policies = Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/groupPolicyConfigurations/$ADMXBasedConfigurationProfileId/assignments"
18 | $Policies.Value
19 | } catch {
20 | Write-Log "Response content:`n$responseBody" -Type Error
21 | Write-Log "Failed to get ADMX based Intune Policies." -Type Error -Exception $_.Exception
22 | }
23 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-AzureADApplicationName.ps1:
--------------------------------------------------------------------------------
1 | Function Get-AzureADApplicationName(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the AzureAD Application Name by ID from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Azure AD Application Name
7 | .EXAMPLE
8 | Get-AzureADApplicationName -AppId 162358712538975698
9 | Returns the Application Name for the given Application id
10 | .NOTES
11 | NAME: Get-AzureADApplicationName
12 | #>
13 | param(
14 | [String]
15 | $AppId
16 | )
17 | try {
18 | if($AppId -match("^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$")){
19 | $uri = "https://graph.microsoft.com/beta/servicePrincipals?`$Filter=appId%20eq%20%27$AppId%27"
20 | $app = (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value[0]
21 | "$($app.displayName)($AppId)"
22 | } else {
23 | $AppId
24 | }
25 | } catch {
26 | $ex = $_.Exception
27 | $errorResponse = $ex.Response.GetResponseStream()
28 | $reader = New-Object System.IO.StreamReader($errorResponse)
29 | $reader.BaseStream.Position = 0
30 | $reader.DiscardBufferedData()
31 | $responseBody = $reader.ReadToEnd();
32 | Write-Log "Response content:`n$responseBody" -Type Error
33 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
34 |
35 | }
36 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-AzureADRole.ps1:
--------------------------------------------------------------------------------
1 | Function Get-AzureADRole(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the AzureAD Role Name by ID from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Azure AD Role Name
7 | .EXAMPLE
8 | Get-AzureADRole -RoleId 162358712538975698
9 | Returns the Role Name for the given Role id
10 | .NOTES
11 | NAME: Get-AzureADRole
12 | #>
13 | param(
14 | [String]
15 | $RoleId
16 | )
17 | try {
18 | if($RoleId -match("^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$")){
19 | $uri = "https://graph.microsoft.com/beta/directoryRoleTemplates/$RoleId"
20 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).displayName
21 | } else {
22 | $RoleId
23 | }
24 | } catch {
25 | $ex = $_.Exception
26 | $errorResponse = $ex.Response.GetResponseStream()
27 | $reader = New-Object System.IO.StreamReader($errorResponse)
28 | $reader.BaseStream.Position = 0
29 | $reader.DiscardBufferedData()
30 | $responseBody = $reader.ReadToEnd();
31 | Write-Log "Response content:`n$responseBody" -Type Error
32 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
33 | }
34 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-AzureADUser.ps1:
--------------------------------------------------------------------------------
1 | Function Get-AzureADUser(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the AzureAD User Name by ID from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Azure AD User Name
7 | .EXAMPLE
8 | Get-AzureADUser -UserId 162358712538975698
9 | Returns the User Name for the given User id
10 | .NOTES
11 | NAME: Get-AzureADUser
12 | #>
13 | param(
14 | [String]
15 | $UserId
16 | )
17 | try {
18 | if($UserId -match("^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$")){
19 | $uri = "https://graph.microsoft.com/beta/users/$UserId"
20 | $user = (Invoke-MSGraphRequest -Url $uri -HttpMethod GET)
21 | "$($user.displayName)($($user.userPrincipalName))"
22 | } else{
23 | $UserId
24 | }
25 | } catch {
26 | $ex = $_.Exception
27 | $errorResponse = $ex.Response.GetResponseStream()
28 | $reader = New-Object System.IO.StreamReader($errorResponse)
29 | $reader.BaseStream.Position = 0
30 | $reader.DiscardBufferedData()
31 | $responseBody = $reader.ReadToEnd();
32 | Write-Log "Response content:`n$responseBody" -Type Error
33 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
34 |
35 | }
36 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-ConditionalAccess.ps1:
--------------------------------------------------------------------------------
1 | Function Get-ConditionalAccess(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Conditional Access from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Azure AD Conditional Access Configuration
7 | .EXAMPLE
8 | Get-ConditionalAccess
9 | Returns the Conditional Access Configuration configured in AzureAD
10 | .NOTES
11 | NAME: Get-ConditionalAccess
12 | #>
13 | try {
14 | $uri = "https://graph.microsoft.com/beta/identity/conditionalAccess/policies"
15 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
16 | } catch {
17 | $ex = $_.Exception
18 | $errorResponse = $ex.Response.GetResponseStream()
19 | $reader = New-Object System.IO.StreamReader($errorResponse)
20 | $reader.BaseStream.Position = 0
21 | $reader.DiscardBufferedData()
22 | $responseBody = $reader.ReadToEnd();
23 | Write-Log "Response content:`n$responseBody" -Type Error
24 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
25 |
26 | }
27 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-ConfigurationProfileBeta.ps1:
--------------------------------------------------------------------------------
1 | Function Get-ConfigurationProfileBeta(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Intune Configuration Profiles from the Beta Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Intune Configuration Profiles
7 | .EXAMPLE
8 | Get-ConfigurationProfileBeta
9 | Returns the Configuration Profiles configured in Intune
10 | .NOTES
11 | NAME: Get-ConfigurationProfileBeta
12 | #>
13 |
14 | try {
15 | $uri = "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations"
16 | $request= (Invoke-MSGraphRequest -Url $uri -HttpMethod GET)
17 | $allScripts= @()
18 |
19 | $request.value.GetEnumerator() | ForEach-Object {
20 | try{
21 | if($null -ne $PSItem.omaSettings){
22 | foreach($setting in ($PSItem.omaSettings)){
23 | $PSItem | Add-Member -MemberType NoteProperty -Name $setting.displayName -Value $setting
24 | }
25 | }
26 | } catch {
27 | Write-Log "Failed to parse omaSettings"
28 | }
29 | $PSItem
30 | }
31 | $allScripts
32 | } catch {
33 | $ex = $_.Exception
34 | $errorResponse = $ex.Response.GetResponseStream()
35 | $reader = New-Object System.IO.StreamReader($errorResponse)
36 | $reader.BaseStream.Position = 0
37 | $reader.DiscardBufferedData()
38 | $responseBody = $reader.ReadToEnd();
39 | Write-Log "Response content:`n$responseBody" -Type Error
40 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
41 | }
42 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-DeviceManagementScript.ps1:
--------------------------------------------------------------------------------
1 | Function Get-DeviceManagementScript(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Intune PowerShell Scripts from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Intune PowerShell Scripts including the scripts
7 | .EXAMPLE
8 | Get-DeviceManagementScript
9 | Returns the Enrollment Status Page Configuration configured in Intune
10 | .NOTES
11 | NAME: Get-DeviceManagementScript
12 | #>
13 |
14 | try {
15 | $uri = "https://graph.microsoft.com/Beta/deviceManagement/deviceManagementScripts"
16 | $request= (Invoke-MSGraphRequest -Url $uri -HttpMethod GET)
17 | $allScripts= @()
18 |
19 | $request.value.GetEnumerator() | ForEach-Object {
20 |
21 | $currentScript =Invoke-MSGraphRequest -HttpMethod GET -Url "https://graph.microsoft.com/Beta/deviceManagement/deviceManagementScripts/$($PSItem.id)"
22 |
23 | $allScripts += [PSCustomObject]@{
24 | id = $currentScript.id
25 | displayName = $currentScript.displayName
26 | description = $currentScript.description
27 | enforceSignatureCheck = $PSItem.enforceSignatureCheck
28 | runAs32Bit = $PSItem.runAs32Bit
29 | runAsAccount = $PSItem.runAsAccount
30 | fileName = $PSItem.fileName
31 | scriptContent = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($currentScript.scriptContent))
32 | }
33 | }
34 | $allScripts
35 | } catch {
36 | $ex = $_.Exception
37 | $errorResponse = $ex.Response.GetResponseStream()
38 | $reader = New-Object System.IO.StreamReader($errorResponse)
39 | $reader.BaseStream.Position = 0
40 | $reader.DiscardBufferedData()
41 | $responseBody = $reader.ReadToEnd();
42 | Write-Log "Response content:`n$responseBody" -Type Error
43 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
44 | }
45 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-DeviceManagementScript_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-DeviceManagementScript_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Intune PowerShell Script Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Intune PowerShell Scripts Assignments
7 | .EXAMPLE
8 | Get-DeviceManagementScript_Assignment -DeviceManagementScriptId $id
9 |
10 | .NOTES
11 | NAME: Get-DeviceManagementScript_Assignment
12 | #>
13 | param(
14 | $DeviceManagementScriptId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceManagement/deviceManagementScripts/$DeviceManagementScriptId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-EnrollmentStatusPage.ps1:
--------------------------------------------------------------------------------
1 | Function Get-EnrollmentStatusPage(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Enrollment Status Page configuration from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Enrollment Status Page Configuration
7 | .EXAMPLE
8 | Get-EnrollmentStatusPage
9 | Returns the Enrollment Status Page Configuration configured in Intune
10 | .NOTES
11 | NAME: Get-EnrollmentStatusPage
12 | #>
13 |
14 | try {
15 | $uri = "https://graph.microsoft.com/Beta/deviceManagement/deviceEnrollmentConfigurations"
16 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
17 | } catch {
18 | $ex = $_.Exception
19 | $errorResponse = $ex.Response.GetResponseStream()
20 | $reader = New-Object System.IO.StreamReader($errorResponse)
21 | $reader.BaseStream.Position = 0
22 | $reader.DiscardBufferedData()
23 | $responseBody = $reader.ReadToEnd();
24 | Write-Log "Response content:`n$responseBody" -Type Error
25 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
26 | }
27 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-EnrollmentStatusPage_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-EnrollmentStatusPage_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Enrollment Status Page configuration Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Enrollment Status Page Configuration Assignments
7 | .EXAMPLE
8 | Get-EnrollmentStatusPage_Assignment -deviceEnrollmentConfigurationsId $id
9 | Returns the Enrollment Status Page Configuration Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-EnrollmentStatusPage_Assignment
12 | #>
13 | param(
14 | $deviceEnrollmentConfigurationsId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceManagement/deviceEnrollmentConfigurations/$deviceEnrollmentConfigurationsId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-MAM_Android_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-MAM_Android_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Android MAM Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Android MAM Assignments
7 | .EXAMPLE
8 | Get-MAM_Android_Assignment -policyId $id
9 | Returns the Android MAM Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-MAM_Android_Assignment
12 | #>
13 | param(
14 | $policyId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceAppManagement/androidManagedAppProtections/$policyId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-MAM_Windows_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-MAM_Windows_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Windows MAM Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Windows MAM Assignments
7 | .EXAMPLE
8 | Get-MAM_Windows_Assignment -policyId $id
9 | Returns the Windows MAM Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-MAM_Windows_Assignment
12 | #>
13 | param(
14 | $policyId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceAppManagement/mdmWindowsInformationProtectionPolicies/$policyId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-MAM_iOS_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-MAM_iOS_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the iOS MAM Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the iOS MAM Assignments
7 | .EXAMPLE
8 | Get-MAM_iOS_Assignment -policyId $id
9 | Returns the iOS MAM Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-MAM_iOS_Assignment
12 | #>
13 | param(
14 | $policyId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceAppManagement/iosManagedAppProtections/$policyId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-ManagedAppConfig_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Get-ManagedAppConfig_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the Managed App Config Assignments from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Managed App Config Assignments
7 | .EXAMPLE
8 | Get-ManagedAppConfig_Assignment -policyId $id
9 | Returns the Managed App Config Assignments configured in Intune
10 | .NOTES
11 | NAME: Get-ManagedAppConfig_Assignment
12 | #>
13 | param(
14 | $policyId
15 | )
16 | try {
17 | $uri = "https://graph.microsoft.com/Beta/deviceAppManagement/targetedManagedAppConfigurations/$policyId/assignments"
18 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
19 | } catch {
20 | $ex = $_.Exception
21 | $errorResponse = $ex.Response.GetResponseStream()
22 | $reader = New-Object System.IO.StreamReader($errorResponse)
23 | $reader.BaseStream.Position = 0
24 | $reader.DiscardBufferedData()
25 | $responseBody = $reader.ReadToEnd();
26 | Write-Log "Response content:`n$responseBody" -Type Error
27 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
28 | }
29 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-MobileAppsBeta.ps1:
--------------------------------------------------------------------------------
1 | Function Get-MobileAppsBeta(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the all mobile apps from the Beta Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the mobile apps
7 | .EXAMPLE
8 | Get-MobileAppsBeta
9 | Returns the mobile apps configured in Intune
10 | .NOTES
11 | NAME: Get-MobileAppsBeta
12 | #>
13 | try {
14 | $uri = "https://graph.microsoft.com/beta/deviceAppManagement/mobileApps"
15 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
16 | } catch {
17 | $ex = $_.Exception
18 | $errorResponse = $ex.Response.GetResponseStream()
19 | $reader = New-Object System.IO.StreamReader($errorResponse)
20 | $reader.BaseStream.Position = 0
21 | $reader.DiscardBufferedData()
22 | $responseBody = $reader.ReadToEnd();
23 | Write-Log "Response content:`n$responseBody" -Type Error
24 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
25 |
26 | }
27 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-SecBaselinesBeta.ps1:
--------------------------------------------------------------------------------
1 | Function Get-SecBaselinesBeta(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the all Security Baselines from the Beta Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the Security Baselines
7 | .EXAMPLE
8 | Get-SecBaselinesBeta
9 | Returns the Security Baselines configured in Intune
10 | .NOTES
11 | NAME: Get-SecBaselinesBeta
12 | #>
13 | try {
14 | $uri = "https://graph.microsoft.com/beta/deviceManagement/intents"
15 | $templates = (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
16 | $returnTemplates = @()
17 | foreach($template in $templates){
18 | $settings = Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceManagement/intents/$($template.id)/settings"
19 | $templateDetail = Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceManagement/templates/$($template.templateId)"
20 | $returnTemplate = [PSCustomObject]@{ id = $template.id }
21 | $returnTemplate | Add-Member Noteproperty -Name Name -Value $template.displayName -Force
22 | $typeString = "$($templateDetail.platformType)-$($templateDetail.templateType)-$($templateDetail.templateSubtype)"
23 | $returnTemplate | Add-Member Noteproperty -Name '@odata.type' -Value $typeString -Force
24 |
25 | $TempSettings = @()
26 | foreach($setting in $settings.value){
27 | # $settingDef = Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceManagement/settingDefinitions/$($setting.id)" -ErrorAction SilentlyContinue
28 | # $displayName = $settingDef.Value.displayName
29 | # if($null -eq $displayName){
30 | $displayName = $setting.definitionId -replace "deviceConfiguration--","" -replace "admx--","" -replace "_"," "
31 | # }
32 | if($null -eq $setting.value){
33 |
34 | if($setting.definitionId -eq "deviceConfiguration--windows10EndpointProtectionConfiguration_firewallRules"){
35 | $v = $setting.valueJson | ConvertFrom-Json
36 | foreach($item in $v){
37 | $TempSetting = [PSCustomObject]@{ Name = "FW Rule - $($item.displayName)"; Value = ($item | ConvertTo-Json) }
38 | $TempSettings += $TempSetting
39 | }
40 | } else {
41 |
42 | $v = ""
43 | $TempSetting = [PSCustomObject]@{ Name = $displayName; Value = $v }
44 | $TempSettings += $TempSetting
45 | }
46 | } else {
47 | $v = $setting.value
48 | $TempSetting = [PSCustomObject]@{ Name = $displayName; Value = $v }
49 | $TempSettings += $TempSetting
50 | }
51 |
52 | }
53 | $returnTemplate | Add-Member Noteproperty -Name Settings -Value $TempSettings -Force
54 | $assignments = Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceManagement/intents/$($template.id)/assignments"
55 | $returnTemplate | Add-Member Noteproperty -Name Assignments -Value $assignments.Value -Force
56 | $returnTemplates += $returnTemplate
57 | }
58 | $returnTemplates
59 |
60 | } catch {
61 | $ex = $_.Exception
62 | $errorResponse = $ex.Response.GetResponseStream()
63 | $reader = New-Object System.IO.StreamReader($errorResponse)
64 | $reader.BaseStream.Position = 0
65 | $reader.DiscardBufferedData()
66 | $responseBody = $reader.ReadToEnd();
67 | Write-Log "Response content:`n$responseBody" -Type Error
68 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
69 |
70 | }
71 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Get-WindowsAutopilotConfig.ps1:
--------------------------------------------------------------------------------
1 | Function Get-WindowsAutopilotConfig(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to get the AutoPilot configuration from the Graph API REST interface
5 | .DESCRIPTION
6 | The function connects to the Graph API Interface and gets the AutoPilot Configuration
7 | .EXAMPLE
8 | Get-WindowsAutopilotConfig
9 | Returns the AutoPilot Configuration configured in Intune
10 | .NOTES
11 | NAME: Get-WindowsAutopilotConfig
12 | #>
13 | try {
14 | $uri = "https://graph.microsoft.com/Beta/deviceManagement/windowsAutopilotDeploymentProfiles"
15 | (Invoke-MSGraphRequest -Url $uri -HttpMethod GET).Value
16 | } catch {
17 | $ex = $_.Exception
18 | $errorResponse = $ex.Response.GetResponseStream()
19 | $reader = New-Object System.IO.StreamReader($errorResponse)
20 | $reader.BaseStream.Position = 0
21 | $reader.DiscardBufferedData()
22 | $responseBody = $reader.ReadToEnd();
23 | Write-Log "Response content:`n$responseBody" -Type Error
24 | Write-Log "Request to $Uri failed with HTTP Status $($ex.Response.StatusCode) $($ex.Response.StatusDescription)" -Type Error
25 |
26 | }
27 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintAssignmentDetail.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintAssignmentDetail(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to print the assignment information to the word file.
5 | .DESCRIPTION
6 | This function is used to print the assignment information to the word file. It also gets group names.
7 | .EXAMPLE
8 | Invoke-PrintAssignmentDetail -Assignments $assignment
9 | Prints the information from the Assignents Array
10 | .NOTES
11 | NAME: Invoke-PrintAssignmentDetail
12 | #>
13 | param(
14 | $Assignments
15 | )
16 |
17 | if($Assignments){
18 | $ExtendedInfo = @()
19 | write-Log "Document assignments..."
20 | Add-Header -level 3 -format $format -Text "Assignments"
21 | if($Assignments.count -gt 1){
22 | foreach($Assignment in $Assignments){
23 | $ExtendedInfo += Invoke-PrintAssignmentDetail_Assignment -Assignment $Assignment
24 | }
25 | } else {
26 | $ExtendedInfo += Invoke-PrintAssignmentDetail_Assignment -Assignment $Assignments
27 | }
28 | if($null -ne $ExtendedInfo){
29 | Add-Table -InputObject $ExtendedInfo -format $format
30 | } else {
31 | Add-Text -format $format -Text "No assignments"
32 | }
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintAssignmentDetail_Assignment.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintAssignmentDetail_Assignment(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to collect information about assignment and the group.
5 | .DESCRIPTION
6 | This function is used to collect information about assignment and the group.
7 | .EXAMPLE
8 | Invoke-PrintAssignmentDetail_Assignment -Assignment $assignment
9 | Returns the information from the Assignent
10 |
11 | .OUTPUTS
12 | Outputs a custom object with the following structure:
13 | - Name
14 | - MemberCount
15 | - Type
16 | - DynamicRule
17 |
18 | .NOTES
19 | NAME: Invoke-PrintAssignmentDetail_Assignment
20 | #>
21 | param(
22 | $Assignment
23 | )
24 | if($null -ne $Assignment.target.groupId){
25 | $GroupObj = Get-Groups -groupid $Assignment.target.groupId
26 | $Name = $GroupObj.displayName
27 | if($GroupObj.groupTypes -contains "DynamicMembership"){
28 | if($GroupObj.membershipRule -like "*user.*"){
29 | $GType = "DynamicUser"
30 | } else {
31 | $GType = "DynamicDevice"
32 | }
33 | } else {
34 | $GType = "Static"
35 | }
36 | $Members = Get-Groups_Members -groupId $Assignment.target.groupId
37 | if($null -eq $Members.count){
38 | if($null -eq $Members){
39 | $MemberCount = 1
40 | } else {
41 | $MemberCount = 0
42 | }
43 | } else {
44 | $MemberCount = $Members.count
45 | }
46 | $DynamicRule = $GroupObj.membershipRule
47 | if($null -eq $DynamicRule){
48 | $DynamicRule = "-"
49 | }
50 | $returnObj =[PSCustomObject]@{
51 | Name = $Name
52 | MemberCount = $MemberCount
53 | GroupType = $GType
54 | DynamicRule = $DynamicRule
55 | }
56 | } else {
57 |
58 | $Name = "$(($Assignment.target.'@odata.type' -replace "#microsoft.graph.",''))"
59 | switch ( $Name )
60 | {
61 | "allDevicesAssignmentTarget" { $Name = "All Devices" }
62 | "allLicensedUsersAssignmentTarget" { $Name = "All Users" }
63 | }
64 |
65 | $returnObj =[PSCustomObject]@{
66 | Name = $Name
67 | MemberCount = "-"
68 | GroupType = "BuilIn"
69 | DynamicRule = "-"
70 | }
71 | }
72 |
73 | #Intent if Available
74 | if($null -ne $Assignment.intent){
75 | $returnObj | Add-Member -MemberType NoteProperty -Name "Intent" -Value $Assignment.intent
76 | } else {
77 | $returnObj | Add-Member -MemberType NoteProperty -Name "Intent" -Value "-"
78 | }
79 | # Source
80 | if($null -ne $Assignment.source){
81 | $returnObj | Add-Member -MemberType NoteProperty -Name "Source" -Value $Assignment.source
82 | } else {
83 | $returnObj | Add-Member -MemberType NoteProperty -Name "Source" -Value "-"
84 | }
85 | # Include or Exclude
86 | if($Assignment.'@odata.type' -imatch 'exclusion'){
87 | $returnObj | Add-Member -MemberType NoteProperty -Name "Type" -Value "Exclude"
88 | } else {
89 | $returnObj | Add-Member -MemberType NoteProperty -Name "Type" -Value "Include"
90 | }
91 |
92 | $returnObj
93 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintGroup.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintGroup(){
2 | <#
3 | .SYNOPSIS
4 | This function retrieves details about an AAD group.
5 | .DESCRIPTION
6 | This function retrieves details about an AAD group.
7 | .EXAMPLE
8 | Invoke-PrintGroup -GroupId $assignment
9 | Returns the information from the Group
10 |
11 | .OUTPUTS
12 | Outputs a custom object with the following structure:
13 | - Name
14 | - MemberCount
15 | - GroupType
16 | - DynamicRule
17 |
18 | .NOTES
19 | NAME: Invoke-PrintGroup
20 | #>
21 | param(
22 | $GroupIds
23 | )
24 | $GroupObjs = @()
25 | foreach($GroupId in ($GroupIds | Select-Object -Unique)){
26 | $GroupObj = Get-Groups -groupid $GroupId
27 | $Name = $GroupObj.displayName
28 | if($GroupObj.groupTypes -contains "DynamicMembership"){
29 | if($GroupObj.membershipRule -like "*user.*"){
30 | $GType = "DynamicUser"
31 | } else {
32 | $GType = "DynamicDevice"
33 | }
34 | } else {
35 | $GType = "Static"
36 | }
37 | $Members = Get-Groups_Members -groupId $GroupId
38 | if($null -eq $Members.count){
39 | if($null -eq $Members){
40 | $MemberCount = 1
41 | } else {
42 | $MemberCount = 0
43 | }
44 | } else {
45 | $MemberCount = $Members.count
46 | }
47 | $DynamicRule = $GroupObj.membershipRule
48 | if($null -eq $DynamicRule){
49 | $DynamicRule = "-"
50 | }
51 | $GroupObjs +=[PSCustomObject]@{
52 | Name = $Name
53 | MemberCount = $MemberCount
54 | GroupType = $GType
55 | DynamicRule = $DynamicRule
56 | }
57 | }
58 | if($null -ne $GroupObjs){
59 | Add-Table -InputObject $GroupObjs -format $format
60 | }
61 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintTable.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintTable(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to print the assignment information to the word file.
5 | .DESCRIPTION
6 | This function is used to print the assignment information to the word file. It also gets group names.
7 | .EXAMPLE
8 | Invoke-PrintAssignmentDetail -Assignments $assignment
9 | Prints the information from the Assignents Array
10 | .NOTES
11 | NAME: Invoke-TranslatePropertyName
12 | #>
13 | param(
14 | [Parameter(Mandatory=$true)]
15 | $Properties,
16 | [Parameter(Mandatory=$true)]
17 | [String]$TypeName
18 | )
19 | if($Script:UseTranslation){
20 | Invoke-PrintTableTranslate -Properties $Properties -TypeName $TypeName
21 | } else {
22 | Invoke-PrintTableNormal -Properties $Properties
23 | }
24 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintTableNormal.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintTableNormal(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to print the configuration without translation to the word file.
5 | .EXAMPLE
6 | Invoke-TableNormal -Properties $p -TypeName $t
7 | Prints the information from the Config Array
8 | .NOTES
9 | NAME: Invoke-TableNormal
10 | #>
11 | param(
12 | [Parameter(Mandatory=$true)]
13 | $Properties
14 | )
15 | $MaxStringLengthSettings = 350
16 | $ht = @{}
17 |
18 | foreach($p in $Properties) {
19 | $Name = $p.Name
20 | if((Format-MsGraphData "$($p.Value)").Length -gt $MaxStringLengthSettings){
21 | $Value = "$((Format-MsGraphData "$($p.Value)").substring(0, $MaxStringLengthSettings))..."
22 | } else {
23 | $Value = "$((Format-MsGraphData "$($p.Value)")) "
24 | }
25 |
26 | if($null -eq $Value){
27 | $Value = ""
28 | } elseif ($format -eq 'md') {
29 | # Markdown has rendering issues with new lines in a table
30 | $Value = ($Value -replace ('\r\n', '')) -replace ('\n','')
31 | # some oma setting values are in xml format, wrap this part to avoid rendering issues
32 | $pattern = [regex]'(.*)value=<(.*)'
33 | if ($Value -match $pattern) {
34 | $Value = $pattern.Replace($Value, '$1value=<$2
', 1)
35 | }
36 | }
37 | $ht[$Name] = $Value
38 | }
39 | Add-Table -InputObject ($ht.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
40 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-PrintTableTranslate.ps1:
--------------------------------------------------------------------------------
1 | Function Invoke-PrintTableTranslate(){
2 | <#
3 | .SYNOPSIS
4 | This function is used to print the configuration with translation to the word file.
5 | .EXAMPLE
6 | Invoke-TableTranslate -Properties $p -TypeName $t
7 | Prints the information from the Config Array
8 | .NOTES
9 | NAME: Invoke-TableTranslate
10 | #>
11 | param(
12 | [Parameter(Mandatory=$true)]
13 | $Properties,
14 | [Parameter(Mandatory=$true)]
15 | [String]$TypeName
16 | )
17 | $MaxStringLengthSettings = 350
18 | $ht = @{}
19 | $TranslationFile = "$PSScriptRoot\..\Data\LabelTranslation\$TypeName.json"
20 |
21 | $translateJson = Get-Content $TranslationFile -ErrorAction SilentlyContinue
22 | if($null -eq $translateJson){
23 | $translateJson = "{}"
24 | }
25 | $translation = $translateJson | ConvertFrom-Json
26 |
27 | foreach($p in $Properties) {
28 | if([String]::IsNullOrWhiteSpace($translation."$($p.Name)")){
29 | $TranslationValue = switch($p.Name){
30 | "displayName" { "Displayname" }
31 | "lastModifiedDateTime" { "Modified at" }
32 | "@odata.type" { "OData Type" }
33 | "supportsScopeTags" { "Support for Scope Tags" }
34 | "roleScopeTagIds" { "Role Scopes Tags" }
35 | "deviceManagementApplicabilityRuleOsEdition" { "Applicability OS Edition" }
36 | "deviceManagementApplicabilityRuleOsVersion" { "Applicability OS Version" }
37 | "deviceManagementApplicabilityRuleDeviceMode" { "Applicability Device Mode" }
38 | "createdDateTime" { "Created at" }
39 | "description" { "Description" }
40 | "version" { "Version" }
41 | "id" {'ID'}
42 | default { '' }
43 | }
44 | if([String]::IsNullOrWhiteSpace($TranslationValue)){
45 | $Section = " "
46 | } else {
47 | $Section = "Metadata"
48 | }
49 |
50 | if($p.TypeNameOfValue -eq "System.Boolean"){
51 | $TranslationObject = New-Object PSObject -Property @{
52 | Name = $TranslationValue
53 | Section = $Section
54 | DataType = $p.TypeNameOfValue
55 | ValueTrue = "Block"
56 | ValueFalse = "Not Configured"
57 | }
58 | } else {
59 | $TranslationObject = New-Object PSObject -Property @{
60 | Name = $TranslationValue
61 | Section = $Section
62 | DataType = $p.TypeNameOfValue
63 | }
64 | }
65 | #Only use translated value if not empty
66 | if([String]::IsNullOrWhiteSpace($TranslationValue)){
67 | $Name = Convert-CamelCaseToDisplayName -Value $p.Name
68 | } else {
69 | $Name = $TranslationValue
70 | }
71 | $translation | Add-Member Noteproperty -Name $p.Name -Value $TranslationObject -Force
72 | $translation | ConvertTo-Json | Out-File -FilePath $TranslationFile -Force
73 | #Variable set for user information in main function
74 | $Script:NewTranslationFiles += $TranslationFile
75 | } else {
76 | #Only use translated value if not empty
77 | if([String]::IsNullOrWhiteSpace($translation."$($p.Name)".Name)){
78 | $Name = $p.Name
79 | } else {
80 | $Name = $translation."$($p.Name)".Name
81 | }
82 |
83 | }
84 |
85 | # Value
86 | if($p.TypeNameOfValue -eq "System.Boolean"){
87 | if([String]::IsNullOrWhiteSpace($translation."$($p.Name)".Name)){
88 | $Value = $p.Value
89 | } else {
90 | if($p.Value -eq $true){
91 | $Value = $translation."$($p.Name)".ValueTrue
92 | } else {
93 | $Value = $translation."$($p.Name)".ValueFalse
94 | }
95 | }
96 | } else {
97 | if((Format-MsGraphData "$($p.Value)").Length -gt $MaxStringLengthSettings){
98 | $Value = "$((Format-MsGraphData "$($p.Value)").substring(0, $MaxStringLengthSettings))..."
99 | } else {
100 | $Value = "$((Format-MsGraphData "$($p.Value)")) "
101 | }
102 | }
103 | if($null -eq $Value){
104 | $Value = ""
105 | } elseif ($format -eq 'md') {
106 | # Markdown has rendering issues with new lines in a table
107 | $Value = ($Value -replace ('\r\n', '')) -replace ('\n','')
108 | # some oma setting values are in xml format, wrap this part to avoid rendering issues
109 | $pattern = [regex]'(.*)value=<(.*)'
110 | if ($Value -match $pattern) {
111 | $Value = $pattern.Replace($Value, '$1value=<$2
', 1)
112 | }
113 | }
114 | $ht[$Name] = $Value
115 | }
116 | Add-Table -InputObject ($ht.GetEnumerator() | Sort-Object -Property Name | Select-Object Name,Value) -format $format
117 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Invoke-TransponseObject.ps1:
--------------------------------------------------------------------------------
1 | function Invoke-TransposeObject {
2 | <#
3 | .SYNOPSIS
4 | Transpose properties of objects from columns to rows.
5 | .DESCRIPTION
6 | Transpose properties of objects from columns to rows. Useful when the order displayed in a GridView (with
7 | Out-GridView) or in a CSV file (with Export-Csv) should be rotated.
8 | It uses the name property as new property names (column headers) if it exists.
9 | .INPUTS
10 | Object
11 | .OUTPUTS
12 | Transposed object
13 | .EXAMPLE
14 | dir | Transpose-Object | Out-GridView
15 |
16 | Shows directory listing with a column instead of a row for every file/directory
17 | .EXAMPLE
18 | ps | Transpose-Object | Export-Csv Processes.csv -Delimiter ';' -NoTypeInformation
19 |
20 | Creates a CSV file with a column instead of a row for every process
21 | .NOTES
22 | Name: Transpose-Object
23 | Author: Markus Scholtes
24 | Version: 1.0 - Initial version
25 | Creation Date: 01/11/2019
26 | #>
27 | [OutputType('System.Object[]')]
28 | [CmdletBinding()]
29 | Param([OBJECT][Parameter(ValueFromPipeline = $TRUE)]$InputObject)
30 |
31 | BEGIN
32 | { # initialize variables just to be "clean"
33 | $Props = @()
34 | $PropNames = @()
35 | $InstanceNames = @()
36 | }
37 |
38 | PROCESS
39 | {
40 | if ($Props.Length -eq 0)
41 | { # when first object in pipeline arrives retrieve its property names
42 | $PropNames = $InputObject.PSObject.Properties | Select-Object -ExpandProperty Name
43 | # and create a PSCustomobject in an array for each property
44 | $InputObject.PSObject.Properties | ForEach-Object{ $Props += New-Object -TypeName PSObject -Property @{Property = $_.Name} }
45 | }
46 |
47 | if ($InputObject.M_DisplayName)
48 | { # does object have a "Name" property?
49 | $Property = $InputObject.M_DisplayName
50 | } else { # no, take object itself as property name
51 | $Property = $InputObject | Out-String
52 | }
53 |
54 | if ($InstanceNames -contains $Property)
55 | { # does multiple occurence of name exist?
56 | $COUNTER = 0
57 | do { # yes, append a number in brackets to name
58 | $COUNTER++
59 | $Property = "$($InputObject.M_DisplayName) ({0})" -f $COUNTER
60 | } while ($InstanceNames -contains $Property)
61 | }
62 | # add current name to name list for next name check
63 | $InstanceNames += $Property
64 |
65 | # retrieve property values and add them to the property's PSCustomobject
66 | $COUNTER = 0
67 | $PropNames | ForEach-Object{
68 | if ($InputObject.($_))
69 | { # property exists for current object
70 | $Props[$COUNTER] | Add-Member -Name $Property -Type NoteProperty -Value $InputObject.($_)
71 | } else { # property does not exist for current object, add $NULL value
72 | $Props[$COUNTER] | Add-Member -Name $Property -Type NoteProperty -Value $NULL
73 | }
74 | $COUNTER++
75 | }
76 | }
77 |
78 | END
79 | {
80 | # return collection of PSCustomobjects with property values
81 | $Props
82 | }
83 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Set-AzureADAppPermission.ps1:
--------------------------------------------------------------------------------
1 | Function Set-AzureADAppPermission
2 | {
3 | [CmdletBinding(SupportsShouldProcess, ConfirmImpact='Medium')]
4 | param
5 | (
6 | [string] $targetServicePrincipalName,
7 | $appPermissionsRequired,
8 | $childApp,
9 | $spForApp
10 | )
11 | if ($PSCmdlet.ShouldProcess("Target", "Operation"))
12 | {
13 | $targetSp = Get-AzureADServicePrincipal -Filter "DisplayName eq '$($targetServicePrincipalName)'"
14 |
15 | # Iterate Permissions array
16 | Write-Verbose ('Retrieve Role Assignments objects')
17 | $RoleAssignments = @()
18 | Foreach ($AppPermission in $appPermissionsRequired) {
19 | $RoleAssignment = $targetSp.AppRoles | Where-Object { $_.Value -eq $AppPermission}
20 | $RoleAssignments += $RoleAssignment
21 | }
22 |
23 | $ResourceAccessObjects = New-Object 'System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.ResourceAccess]'
24 | foreach ($RoleAssignment in $RoleAssignments) {
25 | $resourceAccess = New-Object -TypeName "Microsoft.Open.AzureAD.Model.ResourceAccess"
26 | $resourceAccess.Id = $RoleAssignment.Id
27 | $resourceAccess.Type = 'Role'
28 | $ResourceAccessObjects.Add($resourceAccess)
29 | }
30 | $requiredResourceAccess = New-Object -TypeName "Microsoft.Open.AzureAD.Model.RequiredResourceAccess"
31 | $requiredResourceAccess.ResourceAppId = $targetSp.AppId
32 | $requiredResourceAccess.ResourceAccess = $ResourceAccessObjects
33 |
34 | # set the required resource access
35 | Set-AzureADApplication -ObjectId $childApp.ObjectId -RequiredResourceAccess $requiredResourceAccess
36 | Start-Sleep -s 1
37 |
38 | # grant the required resource access
39 | foreach ($RoleAssignment in $RoleAssignments) {
40 | Write-Verbose ('Granting admin consent for App Role: {0}' -f $($RoleAssignment.Value))
41 | New-AzureADServiceAppRoleAssignment -ObjectId $spForApp.ObjectId -Id $RoleAssignment.Id -PrincipalId $spForApp.ObjectId -ResourceId $targetSp.ObjectId
42 | Start-Sleep -s 1
43 | }
44 | } else {
45 | Write-Information "Create Azure AD Application and set permission."
46 | }
47 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Update-Text.ps1:
--------------------------------------------------------------------------------
1 | function Update-Text {
2 | <#
3 | .SYNOPSIS
4 | This function is used to replace text found in the documentation with a new value.
5 | .EXAMPLE
6 | Update-Text -format 'md' -SearchText "abc" -NewText "def"
7 | Updates all occurences of 'abc' with 'def' in the 'md' format file at $FullDocumentationPath
8 | .NOTES
9 | NAME: Update-Text
10 | #>
11 | param(
12 | [Parameter(Mandatory = $true)]
13 | [String]$format,
14 |
15 | [Parameter(Mandatory = $true)]
16 | [String]$SearchText,
17 |
18 | [Parameter(Mandatory = $true)]
19 | [String]$NewText
20 | )
21 |
22 | if ($format -eq 'md') {
23 | ((Get-Content -path $FullDocumentationPath -Raw) -replace $SearchText, $NewText) | Set-Content -Path $FullDocumentationPath
24 | } else {
25 | Update-WordText -FilePath $FullDocumentationPath -ReplacingText $SearchText -NewText $NewText
26 | }
27 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/Internal/Write-Log.ps1:
--------------------------------------------------------------------------------
1 | function Write-Log {
2 | <#
3 | .DESCRIPTION
4 | Write text to a logfile with the current time.
5 |
6 | .PARAMETER Message
7 | Specifies the message to log.
8 |
9 | .PARAMETER Type
10 | Type of Message ("Info","Debug","Warn","Error").
11 |
12 | .PARAMETER OutputMode
13 | Specifies where the log should be written. Possible values are "Console","LogFile" and "Both".
14 |
15 | .PARAMETER Exception
16 | You can write an exception object to the log file if there was an exception.
17 |
18 | .EXAMPLE
19 | Write-Log -Message "Start process XY"
20 |
21 | .NOTES
22 | This function should be used to log information to console or log file.
23 | #>
24 | param(
25 | [Parameter(Mandatory=$true,Position=1)]
26 | [String]
27 | $Message
28 | ,
29 | [Parameter(Mandatory=$false)]
30 | [ValidateSet("Info","Debug","Warn","Error")]
31 | [String]
32 | $Type = "Debug"
33 |
34 | ,
35 | [Parameter(Mandatory=$false)]
36 | [Exception]
37 | $Exception
38 | )
39 | $LogFilePathFolder = Join-Path -Path $Env:TEMP -ChildPath $ScriptName
40 | $OutputMode = "Console" # "Console-LogFile","Console-WindowsEvent","LogFile-WindowsEvent","Console","LogFile","WindowsEvent","All"
41 | $DefaultLogWindowsEventSource = "IntuneDocumentation"
42 | $DefaultLogWindowsEventLog = "CustomPS"
43 | $LogFilePath = "$LogFilePathFolder\IntuneDocumentation_$(Get-Date -uformat %Y%m%d%H%M).log"
44 | $DateTimeString = Get-Date -Format "yyyy-MM-dd HH:mm:sszz"
45 | $Output = ($DateTimeString + "`t" + $Type.ToUpper() + "`t" + $Message)
46 | if($Exception){
47 | $ExceptionString = ("[" + $Exception.GetType().FullName + "] " + $Exception.Message)
48 | $Output = "$Output - $ExceptionString"
49 | }
50 | if ($OutputMode -eq "Console" -OR $OutputMode -eq "Console-LogFile" -OR $OutputMode -eq "Console-WindowsEvent" -OR $OutputMode -eq "All") {
51 | if($Type -eq "Error"){
52 | Write-Error $output
53 | } elseif($Type -eq "Warn"){
54 | Write-Warning $output
55 | } elseif($Type -eq "Debug"){
56 | Write-Debug $output
57 | } else{
58 | Write-Verbose $output -Verbose
59 | }
60 | }
61 | if ($OutputMode -eq "LogFile" -OR $OutputMode -eq "Console-LogFile" -OR $OutputMode -eq "LogFile-WindowsEvent" -OR $OutputMode -eq "All") {
62 | try {
63 | Add-Content $LogFilePath -Value $Output -ErrorAction Stop
64 | } catch {
65 | exit 99001
66 | }
67 | }
68 | if ($OutputMode -eq "Console-WindowsEvent" -OR $OutputMode -eq "WindowsEvent" -OR $OutputMode -eq "LogFile-WindowsEvent" -OR $OutputMode -eq "All") {
69 | try {
70 | New-EventLog -LogName $DefaultLogWindowsEventLog -Source $DefaultLogWindowsEventSource -ErrorAction SilentlyContinue
71 | switch ($Type) {
72 | "Warn" {
73 | $EventType = "Warning"
74 | break
75 | }
76 | "Error" {
77 | $EventType = "Error"
78 | break
79 | }
80 | default {
81 | $EventType = "Information"
82 | }
83 | }
84 | Write-EventLog -LogName $DefaultLogWindowsEventLog -Source $DefaultLogWindowsEventSource -EntryType $EventType -EventId 1 -Message $Output -ErrorAction Stop
85 | } catch {
86 | exit 99002
87 | }
88 | }
89 | }
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/IntuneDocumentation.psd1:
--------------------------------------------------------------------------------
1 | #
2 | # Module manifest for module 'IntuneDocumentation'
3 | #
4 | # Generated by: Thomas Kurth
5 | #
6 | # Generated on: 03.02.2021
7 | #
8 |
9 | @{
10 |
11 | # Script module or binary module file associated with this manifest.
12 | RootModule = 'IntuneDocumentation.psm1'
13 |
14 | # Version number of this module.
15 | ModuleVersion = '2.0.19'
16 |
17 | # Supported PSEditions
18 | # CompatiblePSEditions = @()
19 |
20 | # ID used to uniquely identify this module
21 | GUID = '10231a0d-b6a4-2a17-a726-e3b223ad0aa9'
22 |
23 | # Author of this module
24 | Author = 'Thomas Kurth'
25 |
26 | # Company or vendor of this module
27 | CompanyName = 'WorkplaceNinjas'
28 |
29 | # Copyright statement for this module
30 | Copyright = '(c) 2020 Thomas Kurth. All rights reserved.'
31 |
32 | # Description of the functionality provided by this module
33 | Description = 'Automatic Intune and Conditional Access Documentation to simplify the life of admins and consultants.'
34 |
35 | # Minimum version of the Windows PowerShell engine required by this module
36 | PowerShellVersion = '5.0'
37 |
38 | # Name of the Windows PowerShell host required by this module
39 | # PowerShellHostName = ''
40 |
41 | # Minimum version of the Windows PowerShell host required by this module
42 | # PowerShellHostVersion = ''
43 |
44 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45 | # DotNetFrameworkVersion = ''
46 |
47 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48 | # CLRVersion = ''
49 |
50 | # Processor architecture (None, X86, Amd64) required by this module
51 | # ProcessorArchitecture = ''
52 |
53 | # Modules that must be imported into the global environment prior to importing this module
54 | RequiredModules = @('Microsoft.Graph.Intune',
55 | 'PSWord')
56 |
57 | # Assemblies that must be loaded prior to importing this module
58 | # RequiredAssemblies = @()
59 |
60 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
61 | # ScriptsToProcess = @()
62 |
63 | # Type files (.ps1xml) to be loaded when importing this module
64 | # TypesToProcess = @()
65 |
66 | # Format files (.ps1xml) to be loaded when importing this module
67 | # FormatsToProcess = @()
68 |
69 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
70 | # NestedModules = @()
71 |
72 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
73 | FunctionsToExport = 'Invoke-ConditionalAccessDocumentation',
74 | 'Invoke-IntuneDocumentation',
75 | 'New-IntuneDocumentationAppRegistration'
76 |
77 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
78 | CmdletsToExport = @()
79 |
80 | # Variables to export from this module
81 | # VariablesToExport = @()
82 |
83 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
84 | AliasesToExport = @()
85 |
86 | # DSC resources to export from this module
87 | # DscResourcesToExport = @()
88 |
89 | # List of all modules packaged with this module
90 | # ModuleList = @()
91 |
92 | # List of all files packaged with this module
93 | # FileList = @()
94 |
95 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
96 | PrivateData = @{
97 |
98 | PSData = @{
99 |
100 | # Tags applied to this module. These help with module discovery in online galleries.
101 | Tags = 'Intune','Windows','Documentation','MEM','MSGraph','AzureAD','ConditionalAccess'
102 |
103 | # A URL to the license for this module.
104 | # LicenseUri = ''
105 |
106 | # A URL to the main website for this project.
107 | ProjectUri = 'https://github.com/ThomasKur/IntuneDocumentation'
108 |
109 | # A URL to an icon representing this module.
110 | IconUri = 'https://github.com/ThomasKur/IntuneDocumentation/raw/master/Logo/IntuneDocumentationLogo.png'
111 |
112 | # ReleaseNotes of this module
113 | ReleaseNotes = ' 2.0.19 - 02.02.2021 - Thomas Kurth
114 |
115 | - AD group Assignments are now documented in a table with intent, count of members and more information about the AD Group itself.
116 | - Add translation for 5 new profiles
117 | - If no translation is available use a pretty print method to improve readability of API names.
118 | - Add possibility to translate Security Baseline, MAM and compliance policy
119 | - Bugfix
120 | - Spelling errors
121 | - null byte data in scripts error
122 | - OMA-URI (Custom Policy) fixed
123 | - protectedApps in WIP policy now displayed correctly.
124 | - Firewall rules are now dispayed in word file. Per rule one table row instead of all rules in a single row.
125 |
126 |
127 |
128 | To see the complete history, checkout the Release Notes on Github'
129 |
130 | # Prerelease string of this module
131 | # Prerelease = ''
132 |
133 | # Flag to indicate whether the module requires explicit user acceptance for install/update/save
134 | # RequireLicenseAcceptance = $false
135 |
136 | # External dependent modules of this module
137 | # ExternalModuleDependencies = @()
138 |
139 | } # End of PSData hashtable
140 |
141 | } # End of PrivateData hashtable
142 |
143 | # HelpInfo URI of this module
144 | # HelpInfoURI = ''
145 |
146 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
147 | # DefaultCommandPrefix = ''
148 |
149 | }
150 |
151 |
--------------------------------------------------------------------------------
/PSModule/IntuneDocumentation/IntuneDocumentation.psm1:
--------------------------------------------------------------------------------
1 | $functionFolders = @('Functions', 'Internal')
2 |
3 | # Importing all the Functions required for the module from the subfolders.
4 | ForEach ($folder in $functionFolders) {
5 | $folderPath = Join-Path -Path $PSScriptRoot -ChildPath $folder
6 | If (Test-Path -Path $folderPath)
7 | {
8 | Write-Verbose -Message "Importing from $folder"
9 | $functions = Get-ChildItem -Path $folderPath -Filter '*.ps1'
10 | ForEach ($function in $functions)
11 | {
12 | Write-Verbose -Message " Loading $($function.FullName)"
13 | . ($function.FullName)
14 | }
15 | } else {
16 | Write-Warning "Path $folderPath not found. Some parts of the module will not work."
17 | }
18 | }
19 |
20 | $PSWord = Get-Module -Name PSWord
21 | if($PSWord){
22 | Write-Verbose -Message "PSWord module is loaded."
23 | } else {
24 | Write-Warning -Message "PSWord module is not loaded, trying to import it."
25 | Import-Module -Name PSWord
26 | }
27 |
28 | $PSModuleIntune = Get-Module -Name Microsoft.Graph.Intune
29 | if($PSModuleIntune){
30 | Write-Verbose -Message "Intune PowerShell module is loaded."
31 | } else {
32 | Write-Warning -Message "Intune PowerShell module is not loaded, trying to import it."
33 | Import-Module -Name Microsoft.Graph.Intune
34 | }
35 | # SIG # Begin signature block
36 | # MIIZwgYJKoZIhvcNAQcCoIIZszCCGa8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
37 | # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
38 | # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUrVlBFG9PKIBD0gpNLcI2AXDX
39 | # 06igghUDMIID7jCCA1egAwIBAgIQfpPr+3zGTlnqS5p31Ab8OzANBgkqhkiG9w0B
40 | # AQUFADCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIG
41 | # A1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhh
42 | # d3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcg
43 | # Q0EwHhcNMTIxMjIxMDAwMDAwWhcNMjAxMjMwMjM1OTU5WjBeMQswCQYDVQQGEwJV
44 | # UzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xMDAuBgNVBAMTJ1N5bWFu
45 | # dGVjIFRpbWUgU3RhbXBpbmcgU2VydmljZXMgQ0EgLSBHMjCCASIwDQYJKoZIhvcN
46 | # AQEBBQADggEPADCCAQoCggEBALGss0lUS5ccEgrYJXmRIlcqb9y4JsRDc2vCvy5Q
47 | # WvsUwnaOQwElQ7Sh4kX06Ld7w3TMIte0lAAC903tv7S3RCRrzV9FO9FEzkMScxeC
48 | # i2m0K8uZHqxyGyZNcR+xMd37UWECU6aq9UksBXhFpS+JzueZ5/6M4lc/PcaS3Er4
49 | # ezPkeQr78HWIQZz/xQNRmarXbJ+TaYdlKYOFwmAUxMjJOxTawIHwHw103pIiq8r3
50 | # +3R8J+b3Sht/p8OeLa6K6qbmqicWfWH3mHERvOJQoUvlXfrlDqcsn6plINPYlujI
51 | # fKVOSET/GeJEB5IL12iEgF1qeGRFzWBGflTBE3zFefHJwXECAwEAAaOB+jCB9zAd
52 | # BgNVHQ4EFgQUX5r1blzMzHSa1N197z/b7EyALt0wMgYIKwYBBQUHAQEEJjAkMCIG
53 | # CCsGAQUFBzABhhZodHRwOi8vb2NzcC50aGF3dGUuY29tMBIGA1UdEwEB/wQIMAYB
54 | # Af8CAQAwPwYDVR0fBDgwNjA0oDKgMIYuaHR0cDovL2NybC50aGF3dGUuY29tL1Ro
55 | # YXd0ZVRpbWVzdGFtcGluZ0NBLmNybDATBgNVHSUEDDAKBggrBgEFBQcDCDAOBgNV
56 | # HQ8BAf8EBAMCAQYwKAYDVR0RBCEwH6QdMBsxGTAXBgNVBAMTEFRpbWVTdGFtcC0y
57 | # MDQ4LTEwDQYJKoZIhvcNAQEFBQADgYEAAwmbj3nvf1kwqu9otfrjCR27T4IGXTdf
58 | # plKfFo3qHJIJRG71betYfDDo+WmNI3MLEm9Hqa45EfgqsZuwGsOO61mWAK3ODE2y
59 | # 0DGmCFwqevzieh1XTKhlGOl5QGIllm7HxzdqgyEIjkHq3dlXPx13SYcqFgZepjhq
60 | # IhKjURmDfrYwggSjMIIDi6ADAgECAhAOz/Q4yP6/NW4E2GqYGxpQMA0GCSqGSIb3
61 | # DQEBBQUAMF4xCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRTeW1hbnRlYyBDb3Jwb3Jh
62 | # dGlvbjEwMC4GA1UEAxMnU3ltYW50ZWMgVGltZSBTdGFtcGluZyBTZXJ2aWNlcyBD
63 | # QSAtIEcyMB4XDTEyMTAxODAwMDAwMFoXDTIwMTIyOTIzNTk1OVowYjELMAkGA1UE
64 | # BhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMTQwMgYDVQQDEytT
65 | # eW1hbnRlYyBUaW1lIFN0YW1waW5nIFNlcnZpY2VzIFNpZ25lciAtIEc0MIIBIjAN
66 | # BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomMLOUS4uyOnREm7Dv+h8GEKU5Ow
67 | # mNutLA9KxW7/hjxTVQ8VzgQ/K/2plpbZvmF5C1vJTIZ25eBDSyKV7sIrQ8Gf2Gi0
68 | # jkBP7oU4uRHFI/JkWPAVMm9OV6GuiKQC1yoezUvh3WPVF4kyW7BemVqonShQDhfu
69 | # ltthO0VRHc8SVguSR/yrrvZmPUescHLnkudfzRC5xINklBm9JYDh6NIipdC6Anqh
70 | # d5NbZcPuF3S8QYYq3AhMjJKMkS2ed0QfaNaodHfbDlsyi1aLM73ZY8hJnTrFxeoz
71 | # C9Lxoxv0i77Zs1eLO94Ep3oisiSuLsdwxb5OgyYI+wu9qU+ZCOEQKHKqzQIDAQAB
72 | # o4IBVzCCAVMwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDAO
73 | # BgNVHQ8BAf8EBAMCB4AwcwYIKwYBBQUHAQEEZzBlMCoGCCsGAQUFBzABhh5odHRw
74 | # Oi8vdHMtb2NzcC53cy5zeW1hbnRlYy5jb20wNwYIKwYBBQUHMAKGK2h0dHA6Ly90
75 | # cy1haWEud3Muc3ltYW50ZWMuY29tL3Rzcy1jYS1nMi5jZXIwPAYDVR0fBDUwMzAx
76 | # oC+gLYYraHR0cDovL3RzLWNybC53cy5zeW1hbnRlYy5jb20vdHNzLWNhLWcyLmNy
77 | # bDAoBgNVHREEITAfpB0wGzEZMBcGA1UEAxMQVGltZVN0YW1wLTIwNDgtMjAdBgNV
78 | # HQ4EFgQURsZpow5KFB7VTNpSYxc/Xja8DeYwHwYDVR0jBBgwFoAUX5r1blzMzHSa
79 | # 1N197z/b7EyALt0wDQYJKoZIhvcNAQEFBQADggEBAHg7tJEqAEzwj2IwN3ijhCcH
80 | # bxiy3iXcoNSUA6qGTiWfmkADHN3O43nLIWgG2rYytG2/9CwmYzPkSWRtDebDZw73
81 | # BaQ1bHyJFsbpst+y6d0gxnEPzZV03LZc3r03H0N45ni1zSgEIKOq8UvEiCmRDoDR
82 | # EfzdXHZuT14ORUZBbg2w6jiasTraCXEQ/Bx5tIB7rGn0/Zy2DBYr8X9bCT2bW+IW
83 | # yhOBbQAuOA2oKY8s4bL0WqkBrxWcLC9JG9siu8P+eJRRw4axgohd8D20UaF5Mysu
84 | # e7ncIAkTcetqGVvP6KUwVyyJST+5z3/Jvz4iaGNTmr1pdKzFHTx/kuDDvBzYBHUw
85 | # ggWtMIIElaADAgECAhAEP0tn9l4Sf9gdog2gb/SWMA0GCSqGSIb3DQEBBQUAMGUx
86 | # CzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
87 | # dy5kaWdpY2VydC5jb20xJDAiBgNVBAMTG0RpZ2lDZXJ0IEVWIENvZGUgU2lnbmlu
88 | # ZyBDQTAeFw0yMDAzMDYwMDAwMDBaFw0yMzAzMTUxMjAwMDBaMIHOMRMwEQYLKwYB
89 | # BAGCNzwCAQMTAkNIMRowGAYLKwYBBAGCNzwCAQITCVNvbG90aHVybjEdMBsGA1UE
90 | # DwwUUHJpdmF0ZSBPcmdhbml6YXRpb24xGDAWBgNVBAUTD0NIRS0zMTQuNjM5LjUy
91 | # MzELMAkGA1UEBhMCQ0gxEjAQBgNVBAgTCVNvbG90aHVybjERMA8GA1UEBwwIRMOk
92 | # bmlrZW4xFjAUBgNVBAoTDWJhc2VWSVNJT04gQUcxFjAUBgNVBAMTDWJhc2VWSVNJ
93 | # T04gQUcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCn0xZCT8yT681H
94 | # ZVY8gtUlURKywy8Nfq8uiv/jJJU+/Tf4HHXXJzHo96ZFo/WOWMD3WMWRYRnpj95P
95 | # ZbfLaF+ki/PURRhp9/oT/p5O3zTv4Jqnig7AOeIL5dt9W5Uij9rDOEZhmFpVT08K
96 | # CKhMNMMu7MhBs+uHBlyQ70j5H2IjBjePtEDYcakbv1RNDK5hU+k2UqKZEQSaqt2+
97 | # riewxS2R4RUvZJ5nRraf4pNYqDdem2H0vJ17zHsG+ZB0YFLk/P3i6r4tJEAksYAU
98 | # kuJsFDt0Yz9xM2qmG2Rr4iw7AUTfE5Gx0NNWD/fMWFP/2sD3VkHA8Mz8PAokDfFz
99 | # 21OqYrXPAgMBAAGjggHtMIIB6TAfBgNVHSMEGDAWgBStaQZw/IAbFrOpGJRrlAKG
100 | # XvcnjDAdBgNVHQ4EFgQURdlk/2RkqKDvZs8sol0UhzmJTCowNwYDVR0RBDAwLqAs
101 | # BggrBgEFBQcIA6AgMB4MHENILVNPTE9USFVSTi1DSEUtMzE0LjYzOS41MjMwDgYD
102 | # VR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMHMGA1UdHwRsMGowM6Ax
103 | # oC+GLWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9FVkNvZGVTaWduaW5nLWcxLmNy
104 | # bDAzoDGgL4YtaHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0VWQ29kZVNpZ25pbmct
105 | # ZzEuY3JsMEsGA1UdIAREMEIwNwYJYIZIAYb9bAMCMCowKAYIKwYBBQUHAgEWHGh0
106 | # dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwBwYFZ4EMAQMweQYIKwYBBQUHAQEE
107 | # bTBrMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYB
108 | # BQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEVWQ29k
109 | # ZVNpZ25pbmdDQS5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQUFAAOCAQEA
110 | # GYerL9YA8gW4cx7nWEaDFpN2XnaY4+90Nl8gaj6aeQj6kwIfjWLWAzByDdVNvxSk
111 | # rwXdfo3dkG5DNNI3wPR2SE2iyImDF6zXTThccBqkwE1x1Tb5qfhaA48jf18f8Jbv
112 | # VgvtbZWXph1b+ALyD2911b34Qt6cYmolg19vkmWXZUADRjA11S3VHhhH4GLKeHoE
113 | # 23jSSs69tQPNC1jdS+Rx6yO/Ya14UrDwOrJo1qSn2xTilf9s77mSxRJCpL8Cd1PU
114 | # HPvugUFHLw9nqOQAMUb7cHdDUREs7Brvfcyo0qRx7lyKjIM1d0wGtiBz+8kQJcSC
115 | # dK9S8HGSD3y4R1N++Y8gYTCCBrUwggWdoAMCAQICEA3Q4zdKyVvb+mtDSypI7AYw
116 | # DQYJKoZIhvcNAQEFBQAwbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0
117 | # IEluYzEZMBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNl
118 | # cnQgSGlnaCBBc3N1cmFuY2UgRVYgUm9vdCBDQTAeFw0xMjA0MTgxMjAwMDBaFw0y
119 | # NzA0MTgxMjAwMDBaMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
120 | # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNVBAMTG0RpZ2lDZXJ0
121 | # IEVWIENvZGUgU2lnbmluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
122 | # ggEBALkGdBxdtCCqqSGoKkJGqyUgFyXLIo+QoqAxa4MFda+yDnwSSXtqhmSED4Pc
123 | # ZLmxbhYFPhyVuefniG24YoGQedTd9eKW+cO1iCNXShrPcSnpCACPtZjjpzL9rC64
124 | # 9JNT9Ao5Q5Gv1Wvo1J9GvY49q+L5K9TqAEBmJLfof7REdY14mq4xwTfPTh9b+EVK
125 | # 1z/CyZIGZL7eBoqv0OiKsfAsiABvC9yFp0zLBr/WLioybilxr44i8w/Q2JhILagI
126 | # y7aLI8Jj4LZz6299Jk+L9zQ9N4YMt3gn9MKG20NrWvg9PfTosGJWxufteKH7/Xpy
127 | # TzJlxHzDxHegBDIy7Y8/r4bdftECAwEAAaOCA1gwggNUMBIGA1UdEwEB/wQIMAYB
128 | # Af8CAQAwDgYDVR0PAQH/BAQDAgGGMBMGA1UdJQQMMAoGCCsGAQUFBwMDMH8GCCsG
129 | # AQUFBwEBBHMwcTAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29t
130 | # MEkGCCsGAQUFBzAChj1odHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNl
131 | # cnRIaWdoQXNzdXJhbmNlRVZSb290Q0EuY3J0MIGPBgNVHR8EgYcwgYQwQKA+oDyG
132 | # Omh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEhpZ2hBc3N1cmFuY2VF
133 | # VlJvb3RDQS5jcmwwQKA+oDyGOmh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdp
134 | # Q2VydEhpZ2hBc3N1cmFuY2VFVlJvb3RDQS5jcmwwggHEBgNVHSAEggG7MIIBtzCC
135 | # AbMGCWCGSAGG/WwDAjCCAaQwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cuZGlnaWNl
136 | # cnQuY29tL3NzbC1jcHMtcmVwb3NpdG9yeS5odG0wggFkBggrBgEFBQcCAjCCAVYe
137 | # ggFSAEEAbgB5ACAAdQBzAGUAIABvAGYAIAB0AGgAaQBzACAAQwBlAHIAdABpAGYA
138 | # aQBjAGEAdABlACAAYwBvAG4AcwB0AGkAdAB1AHQAZQBzACAAYQBjAGMAZQBwAHQA
139 | # YQBuAGMAZQAgAG8AZgAgAHQAaABlACAARABpAGcAaQBDAGUAcgB0ACAAQwBQAC8A
140 | # QwBQAFMAIABhAG4AZAAgAHQAaABlACAAUgBlAGwAeQBpAG4AZwAgAFAAYQByAHQA
141 | # eQAgAEEAZwByAGUAZQBtAGUAbgB0ACAAdwBoAGkAYwBoACAAbABpAG0AaQB0ACAA
142 | # bABpAGEAYgBpAGwAaQB0AHkAIABhAG4AZAAgAGEAcgBlACAAaQBuAGMAbwByAHAA
143 | # bwByAGEAdABlAGQAIABoAGUAcgBlAGkAbgAgAGIAeQAgAHIAZQBmAGUAcgBlAG4A
144 | # YwBlAC4wHQYDVR0OBBYEFK1pBnD8gBsWs6kYlGuUAoZe9yeMMB8GA1UdIwQYMBaA
145 | # FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQCeW5Y6LhKI
146 | # rKsBbaSfdeQBh6OlMte8uql+o9YUF/fCE2t8c48rauUPJllosI4lm2zv+myTkgjB
147 | # Tc9FnpxG1h50oZsUo/oBL0qxAeFyQEgRE2i5Np2RS9fCORIQwcTcu2IUFCphXU84
148 | # fGYfxhv/rb5Pf5Rbc0MAD01zt1HPDvZ3wFvNNIzZYxOqDmER1vKOJ/y0e7i5ESCR
149 | # hnjqDtQo/yrVJDjoN7LslrufvEoWUOFev1F9I6Ayx8GUnnrJwCaizCWHoBJ+dJ8t
150 | # jbHI54S+udHp3rtqTohzceEiOMskh+lzflGy/5jrTn4v4MoO+rNe0boFQqhIn4P2
151 | # P8TKqN9ooFBhMYIEKTCCBCUCAQEweTBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMM
152 | # RGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQD
153 | # ExtEaWdpQ2VydCBFViBDb2RlIFNpZ25pbmcgQ0ECEAQ/S2f2XhJ/2B2iDaBv9JYw
154 | # CQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAIoAKAAKECgAAwGQYJKoZIhvcN
155 | # AQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUw
156 | # IwYJKoZIhvcNAQkEMRYEFPg2H1LaLO4J1JRq2UG1JFwz+XMgMA0GCSqGSIb3DQEB
157 | # AQUABIIBAFmCFx17Hryn2af72FL4Rbu4hsZipZG4mD6zGyaqQuPyYCT4IFIKE433
158 | # gLMbl7drzOKALXmubDat7tF19hpxMi66vbw0nQaMDo2XTZhnJMnSKLnqLjh4ynCK
159 | # VLDHLBVd9KdQfQGBQgJm5O4ZhrYL5qMudt9HuuGuxCnRy3pAP3f6NGGUovGfXDdS
160 | # bkojPmdWx3pnlZ0LSjY6Kma2uVG7dWqEdhtMU8B/4lYaRvJGGHIuKkOFht8525mf
161 | # sOmRMf1W8Ilqh62n5j8xWuwzvePZDWjpBpiatptEF7WAgrvd5oH2rRzw2WDuDL5W
162 | # 8pMKAl45aM5/MeqEOr+Rghr6pilCo3qhggILMIICBwYJKoZIhvcNAQkGMYIB+DCC
163 | # AfQCAQEwcjBeMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9y
164 | # YXRpb24xMDAuBgNVBAMTJ1N5bWFudGVjIFRpbWUgU3RhbXBpbmcgU2VydmljZXMg
165 | # Q0EgLSBHMgIQDs/0OMj+vzVuBNhqmBsaUDAJBgUrDgMCGgUAoF0wGAYJKoZIhvcN
166 | # AQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjAwNDI2MTE0NTMzWjAj
167 | # BgkqhkiG9w0BCQQxFgQUQ4RqGnbt+JQxUTs1pRkUXcGpS40wDQYJKoZIhvcNAQEB
168 | # BQAEggEAOpyvJKDD3WM8YMP/7S5q8fxmCuB8W0Rr563WuAv4bKvc5aMbska/jK8G
169 | # L3ETTd7QC8hHrrRvBJEou8yEys7UfeZnTVbm/ND7Ms+A14BBSiwMZuT0mUoPu//G
170 | # 9Rxfk5NYRKgjDdXNa8yx/cQD8pkexZpqKzQ7lQQb5YG92ScBddUJfq7r09HM7cD/
171 | # 5AU16Se/E09bfbKcamW3Vv+YRRzXU8bYPk5EQ42OVqhbvmciUeLfhW67obFvIak9
172 | # dvbP/HErGGBzdpcfeC/74NXl5BFrey0blutg/BqhamiTbkjLcn8pdnWSXvlGodFq
173 | # n8bNAofRomWwz3Lq47zteTnVYm0+DQ==
174 | # SIG # End signature block
175 |
--------------------------------------------------------------------------------
/PSModule/build.ps1:
--------------------------------------------------------------------------------
1 | $ModulePath = ".\PSModule\IntuneDocumentation"
2 | $Icon = "https://github.com/ThomasKur/IntuneDocumentation/raw/master/Logo/IntuneDocumentationLogo.png"
3 | $License = "https://github.com/ThomasKur/IntuneDocumentation/blob/master/LICENSE"
4 | #region UI
5 | $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes","Description."
6 | $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No","Description."
7 | $cancel = New-Object System.Management.Automation.Host.ChoiceDescription "&Cancel","Description."
8 | $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $cancel)
9 |
10 | $title = "Version History"
11 | $message = "Have you updated the Release Notes for the new Version?"
12 | $result = $host.ui.PromptForChoice($title, $message, $options, 1)
13 | switch ($result) {
14 | 0{
15 |
16 | }
17 | 1{
18 | Write-Error "Canceled Publishing Process" -ErrorAction Stop
19 | }
20 | 2{
21 | Write-Error "Canceled Publishing Process" -ErrorAction Stop
22 | }
23 | }
24 | #endregion
25 |
26 | #region Code Analyzer
27 | Import-Module -Name PSScriptAnalyzer -Force
28 | $ScriptAnalyzerResult = Invoke-ScriptAnalyzer -Path $ModulePath -Recurse -ErrorAction Stop -ExcludeRule @("PSAvoidTrailingWhitespace")
29 |
30 | if($ScriptAnalyzerResult){
31 | $ScriptAnalyzerResult
32 | Write-Error "Scripts contains errors. PSScriptAnalyzer provided results above."
33 | }
34 | #endregion
35 |
36 | #region Build Manifest
37 | $ExportableFunctions = (Get-ChildItem -Path "$ModulePath\Functions" -Filter '*.ps1').BaseName
38 | $ReleaseNotes = ((Get-Content ".\ReleaseNotes.md" -Raw) -split "##")
39 | $ReleaseNote = ($ReleaseNotes[1] + "`n`n To see the complete history, checkout the Release Notes on Github")
40 |
41 | #Update Version
42 | $ModuelManifestTest = Test-ModuleManifest -Path "$ModulePath\IntuneDocumentation.psd1" -ErrorAction Stop
43 | $CurrentVersion = $ModuelManifestTest.Version
44 | $SuggestedNewVersion = [Version]::new($CurrentVersion.Major,$CurrentVersion.Minor,$CurrentVersion.Build + 1)
45 | $title = "Increment Version"
46 | $message = "Would you like to increase Module Version from $($CurrentVersion) to $($SuggestedNewVersion)?"
47 | $result = $host.ui.PromptForChoice($title, $message, $options, 1)
48 | switch ($result) {
49 | 0{
50 | Write-Information "You selected yes to increase the version. Updating Mnaifest..."
51 | Update-ModuleManifest -Path "$ModulePath\IntuneDocumentation.psd1" `
52 | -FunctionsToExport $ExportableFunctions `
53 | -ReleaseNotes $ReleaseNote `
54 | -RequiredModules @("Microsoft.Graph.Intune","PSWord") `
55 | -IconUri $Icon `
56 | -ModuleVersion $SuggestedNewVersion
57 | }
58 | 1{
59 | Write-Host "You selected no. The version will not be increased."
60 | Update-ModuleManifest -Path "$ModulePath\IntuneDocumentation.psd1" `
61 | -FunctionsToExport $ExportableFunctions `
62 | -ReleaseNotes $ReleaseNote `
63 | -RequiredModules @("Microsoft.Graph.Intune","PSWord") `
64 | -IconUri $Icon `
65 | -ModuleVersion $CurrentVersion
66 | }
67 | 2{
68 | Write-Error "Canceled Publishing Process" -ErrorAction Stop
69 | }
70 | }
71 | Test-ModuleManifest -Path "$ModulePath\IntuneDocumentation.psd1" -ErrorAction Stop
72 | #endregion
73 |
74 | #region Sign Scripts
75 | Copy-Item -Path $ModulePath -Destination $env:TEMP -Recurse -Force
76 | $cert = get-item Cert:\CurrentUser\My\* -CodeSigningCert | Out-GridView -OutputMode Single
77 | $PSFiles = Get-ChildItem -Path $env:TEMP\IntuneDocumentation -Recurse | Where-Object {$_.Extension -eq ".ps1" -or $_.Extension -eq ".psm1"}
78 | foreach($PSFile in $PSFiles){
79 | Set-AuthenticodeSignature -Certificate $cert -TimestampServer http://timestamp.verisign.com/scripts/timstamp.dll -FilePath ($PSFile.FullName) -Verbose
80 | }
81 | #endregion
82 | $PSGallerAPIKey = Read-Host "Insert PSGallery API Key"
83 | Publish-Module -Path $env:TEMP\IntuneDocumentation -NuGetApiKey $PSGallerAPIKey -IconUri $Icon -LicenseUri $License -Verbose
84 |
--------------------------------------------------------------------------------
/PSModule/test.ps1:
--------------------------------------------------------------------------------
1 | $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
2 | import-module "$scriptPath\IntuneDocumentation\IntuneDocumentation.psm1" -force
3 | #Connect-MSGraph -ForceInteractive
4 | $rand = Get-Random -Minimum 0 -Maximum 100
5 | Invoke-IntuneDocumentation -FullDocumentationPath "C:\temp\docu$rand.docx" -UseTranslationBeta
6 | Write-Host "Created Documentation C:\temp\docu$rand.docx"
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Intune & Azure AD Conditional Access Documentation (Depreciated)
2 |
3 |
4 |
5 | > Please use the evolved [M365Documentation](https://github.com/ThomasKur/M365Documentation) script which provides more options.
6 |
7 |
8 |
9 |
Automatic Intune and Conditional Access Documentation to simplify the life of admins and consultants.
10 |
11 | This function Invoke-IntuneDocumentation will document:
12 |
13 | - Configuration Policies
14 | - Compliance Policies
15 | - Device Enrollment Restrictions
16 | - Terms and Conditions
17 | - Applications (Only Assigned)
18 | - Application Protection Policies
19 | - AutoPilot Configuration
20 | - Enrollment Page Configuration
21 | - Apple Push Certificate
22 | - Apple VPP
23 | - Device Categories
24 | - Exchange Connector
25 | - Application Configuration
26 | - PowerShell Scripts
27 | - ADMX backed Configuration Profiles
28 | - Security Baseline
29 | - Custom Roles
30 |
31 | The function Invoke-ConditionalAccessDocumentation will document:
32 |
33 | - Azure AD Conditional Access Policies
34 | - Translate referenced id's to real object names (users, groups, roles and applications)
35 |
36 | ## Usage Intune Documentation
37 |
38 | Since version 2.0.0 the Automatic Intune Documentation script is available in th PowerShell Gallery and therefore its much simpler to install and use it. You can just use these two commands:
39 |
40 | ```powershell
41 |
42 | Install-Module IntuneDocumentation
43 | Invoke-IntuneDocumentation -FullDocumentationPath c:\temp\IntuneDoc.docx
44 |
45 | ```
46 |
47 | **Important:** Before using the Script the first time, you have to ensure, that you have installed the Microsoft.Graph.Intune and PSWord Module. To do that, you have to start PowerShell as an Adminstrator and install them:
48 |
49 | ```powershell
50 |
51 | Install-Module Microsoft.Graph.Intune
52 | Install-Module PSWord
53 |
54 | ```
55 |
56 | ## Usage Conditional Access Documentation
57 |
58 | You can just use these two commands:
59 |
60 | **Important:** The Conditional Access Policy Documentation does not support login with interactive credentials. Therefore, it's required to create a custom app which can be done by calling 'New-IntuneDocumentationAppRegistration'. I recommend saving the result in a password vault and using always the same client secret.
61 |
62 | ```powershell
63 |
64 | # If you have already have the modulte installed then you can skip the first command.
65 | Install-Module IntuneDocumentation
66 | # If App registration already exists it will only creade new CLient Secret. If you know the existing from a previous execution you can skip the next line.
67 | $clientCreds = New-IntuneDocumentationAppRegistration -TokenLifetimeDays 5
68 | Invoke-ConditionalAccessDocumentation -FullDocumentationPath c:\temp\CADoc.docx -ClientId $clientCreds.ClientId -Tenant $clientCreds.TenantId -ClientSecret $clientCreds.ClientSecret
69 |
70 | ```
71 |
72 | ## Additional Options
73 |
74 | ### UseTranslationBeta
75 |
76 | When using this parameter the API names will be translated to the labels used in the Intune Portal.
77 | Note:
78 | These Translations need to be created manually, only a few are translated yet. If you are willing
79 | to support this project. You can do this by [translating the json files](https://github.com/ThomasKur/IntuneDocumentation/blob/master/AddTranslation.md) which are mentioned to you when you generate the documentation in your tenant.
80 |
81 | ```powershell
82 |
83 | Invoke-IntuneDocumentation -FullDocumentationPath c:\temp\IntuneDoc.docx -UseTranslationBeta
84 |
85 | ```
86 |
87 | ### Use script silently
88 |
89 | In the past I got requests that users would like to execute the Intune Documentation script silently. I have now extended the script by two new option and a new functions which can automatically create the App Registration in Azure AD for you.
90 |
91 | #### Automatically Create App Registration
92 |
93 | Your account requires Global Admin privileges to execute these commands and you need to have the AzureAD Module installed.
94 |
95 | ```powershell
96 |
97 | $p = New-IntuneDocumentationAppRegistration
98 | $p | fl
99 |
100 | ```
101 |
102 | The following result will be displayed and can then be used. Safe the ClientSecret in your password vault.
103 |
104 | ```powershell
105 |
106 | ClientID : d5cf6364-82f7-4024-9ac1-73a9fd2a6ec3
107 | ClientSecret : S03AESdMlhLQIPYYw/cYtLkGkQS0H49jXh02AS6Ek0U=
108 | ClientSecretExpiration : 21.07.2025 21:39:02
109 | TenantId : d873f16a-73a2-4ccf-9d36-67b8243ab99a
110 |
111 | ```
112 |
113 | #### Manually Create App Registration
114 |
115 | You can follow the manual of Michael Niehaus https://oofhours.com/2019/11/29/app-based-authentication-with-intune/
116 |
117 | But select also the following permission scopes:
118 |
119 | - 'Policy.Read.All'
120 | - 'Directory.Read.All'
121 | - 'DeviceManagementServiceConfig.Read.All'
122 | - 'DeviceManagementRBAC.Read.All'
123 | - 'DeviceManagementManagedDevices.Read.All'
124 | - 'DeviceManagementConfiguration.Read.All'
125 | - 'DeviceManagementApps.Read.All'
126 | - 'Device.Read.All'
127 | - 'Agreement.Read.All'
128 | - 'Application.Read.All'
129 |
130 | #### Generate Documentation without user interaction
131 |
132 | You can now call the Intune Documentation with the new parameters:
133 |
134 | ```powershell
135 |
136 | Invoke-IntuneDocumentation `
137 | -FullDocumentationPath c:\temp\IntuneDoc.docx `
138 | -ClientId d5cf6364-82f7-4024-9ac1-73a9fd2a6ec3 `
139 | -ClientSecret S03AESdMlhLQIPYYw/cYtLkGkQS0H49jXh02AS6Ek0U= `
140 | -Tenant d873f16a-73a2-4ccf-9d36-67b8243ab99a
141 |
142 | ```
143 |
144 | ## Issues / Feedback
145 |
146 | For any issues or feedback related to this module, please register for GitHub, and post your inquiry to this project's issue tracker.
147 |
148 | ## Thanks to
149 |
150 | @Microsoftgraph for the PowerShell Examples:
151 |
152 | @guidooliveira for the PSWord Module, which enables the creation of the Word file.
153 |
154 | @MScholtes for the Transponse-Object example
155 |
156 | @joslieben for extending and improving the script
157 |
158 | @dads07a for adding Application protection Policies to the documentation
159 |
160 | @mirkocolemberg for the help and testing of the script.
161 |
162 | 
163 |
--------------------------------------------------------------------------------
/ReleaseNotes.md:
--------------------------------------------------------------------------------
1 | # Release Notes
2 |
3 | ## 2.0.19 - 02.02.2021 - Thomas Kurth
4 |
5 | - AD group Assignments are now documented in a table with intent, count of members and more information about the AD Group itself.
6 | - Add translation for 5 new profiles
7 | - If no translation is available use a pretty print method to improve readability of API names.
8 | - Add possibility to translate Security Baseline, MAM and compliance policy
9 | - Bugfix
10 | - Spelling errors
11 | - null byte data in scripts error
12 | - OMA-URI (Custom Policy) fixed
13 | - protectedApps in WIP policy now displayed correctly.
14 | - Firewall rules are now dispayed in word file. Per rule one table row instead of all rules in a single row.
15 |
16 | ## 2.0.18 - 28.07.2020 - Thomas Kurth
17 |
18 | - Bugfix to include App Config assignments
19 | - Improve Conditional Access Documentation
20 | - Generate CSV for COnditional Access Documentation
21 |
22 | ## 2.0.17 - 26.07.2020 - Thomas Kurth
23 |
24 | - Bugfix to include MAM assignments
25 | - Add Conditional Access Documentation
26 | - Conditional Access Documentation - Translate referenced id's to real object names (users, groups, roles and applications)
27 |
28 | ## 2.0.16 - 21.07.2020 - Thomas Kurth
29 |
30 | - Added possibility to run the documentation [in background](README.md#use-script-silently) with a custom App Registration
31 |
32 | ## 2.0.15 - 15.06.2020 - Thomas Kurth
33 |
34 | - Add documentation for Security Baseline.
35 | - Add documentation for Custom Roles.
36 |
37 | ## 2.0.14 - 17.05.2020 - Thomas Kurth
38 |
39 | - Using Beta Graph for retieving Apps. This returns also win32 Lob and Office Suite Apps.
40 |
41 | ## 2.0.13 - 26.04.2020 - Thomas Kurth
42 |
43 | - Deactivated Verbose Loging of Intune PS Module
44 | - Bugfix by David Jacobs
45 | - Hide Section Titles when there is no content
46 | - Start adding translations to have the same property names like in the Intune UI instead of just the API names
47 | - Adding additional translation
48 | - Make translations Optional -UseTranslationBeta
49 |
50 | ## 2.0.12 - 26.03.2020 - Thomas Kurth
51 |
52 | - Bugfix: All ADMX settings are now correctly displayed
53 | - Assignments of various elements like Scripts, ADMX, Enrollment Status Page and Windows Hello for Business are now documented
54 | - Section "Enrollment Status Page" renamed to "Enrollment Configuration" because it contains also WHfB, Enrollment Restrictions, ESP, and Enrollment Limits.
55 | - Configuration Profiles are now loaded from the Beta Graph API. Therefore, much more types are returned. For example the Domain Join configuration is now returned.
56 |
57 | ## 2.0.11 - 30.01.2020 - Thomas Kurth
58 |
59 | - Improve Titles in the ESP Page Section
60 |
61 | ## 2.0.1-10 - 30.01.2020 - Thomas Kurth
62 |
63 | - Various Bugfixing due to PSModule generation
64 |
65 | ## 2.0.0 - 29.01.2020 - Thomas Kurth
66 |
67 | - Migrated to PSModule
68 | - Published to PSGallery
69 |
70 | ## Old History (Before PSModule)
71 |
72 | 001: First Version
73 | 002: SetRegistryKey Function now allows to set empty values
74 | 003: Change CreateFolder Function to first create folder and then write the log. Otherwise whe function can fail, when the logfile folder doesn't exist.
75 | 004: Improved Log Action
76 | 005: Version is now taken from Variable, Log can be written to Windows Event,
77 | ScriptName does no longer contain Script FileName, which is now available in $CurrentFileName
78 | 006: ScriptPath not allways read correctly. Sometimes it was a relative path.
79 | 007: Better formating and Option to specify the Save As location
80 | 008: Jos Lieben: Fixed a few things and added Conditional Access Policies
81 | 009: Thomas Kurth: Adding AutoPilot Information
82 | 010: Thomas Kurth: Complete rewriting and using the Intune PowerShell module
83 | Added Partner Information
84 | 011: Added Application Protection Policies
85 | Tidied up to meet PSScriptAnalyzer Best Practice and removed some whitespace
86 | 012: Thomas Kurth: Added new sections:
87 | - Enrollment Page Configuration
88 | - Apple Push Certificate
89 | - Apple VPP
90 | - Device Categories
91 | - Exchange Connector
92 | 013: Thomas Kurth: Added new Sections:
93 | - PowerShellScripts
94 | - Application COnfiguration
95 | - Added new Template functionality
96 |
97 | 014: Thomas Kurth
98 | - Document ADMX backed Profiles
99 |
--------------------------------------------------------------------------------