-
Notifications
You must be signed in to change notification settings - Fork 1
/
WiscO365 Initial Help.html
754 lines (741 loc) · 85.6 KB
/
WiscO365 Initial Help.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
<!DOCTYPE html>
<!--
<auto-generated>
<synopsis>
This code was generated by a tool. on: 05/26/2017 13:09:05
</synopsis>
<description>
If you'd like to regenerate the documentation, please open up powershell and run
> .\psDoc.ps1 -moduleName NameOfYourModule
If the documentation is incomplete, or eronious,
please edit the comments at the top of the module method within it's respecive .ps1 file.
</description>
</auto-generated>
-->
<html lang="en">
<head>
<title>WiscO365 Module Documentation</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.min.css" rel="stylesheet" charset="utf-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCoreDefault.min.css" rel="stylesheet" charset="utf-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" charset="utf-8">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.embedStyle {
font-family: Arial,"Times New Roman;
font-size: 14px;
height: 1024px;
width: 100%;
}
.gettingStarted {
padding-left: 16px;
padding-bottom: 12px;
}
.syntaxhighlighter {
overflow-y: hidden !important;
overflow-x: auto !important;
}
pre {
min-height: 30px;
}
.navbar-nav {
height: 100%;
overflow-y: auto;
}
.form-group {
padding-top: 12px;
padding-left: 12px;
padding-right: 12px;
}
.sidebar-nav .navbar-header {
float: none;
}
.sidebar-nav .navbar li a {
padding-top: 4px;
padding-bottom: 4px;
}
@media (min-width: 768px) {
.sidebar-nav .navbar .navbar-collapse {
padding: 0;
max-height: none;
}
.sidebar-nav .navbar ul {
float: none;
}
.sidebar-nav .navbar ul:not {
display: block;
}
.sidebar-nav .navbar li {
float: none;
display: block;
}
}
</style>
</head>
<body>
<script>
function displayMessage(){
if(document.getElementById("message-id").style.display == 'block'){
document.getElementById("message-id").style.display = 'none';
document.getElementById("main-content-id").style.display = 'block';
document.getElementById("navbar-id").style.display = 'block';
document.getElementById("button-1").style.display = 'block';
document.getElementById("button-2").style.display = 'none';
}else{
document.getElementById("message-id").style.display = 'block';
document.getElementById("main-content-id").style.display = 'none';
document.getElementById("navbar-id").style.display = 'none';
document.getElementById("button-1").style.display = 'none';
document.getElementById("button-2").style.display = 'block';
}
}
</script>
<div class="container-fluid">
<a href="http://www.wisc.edu/" target="_blank" class="pull-left">
<img src="https://brand.wisc.edu/content/uploads/2016/11/uw-logo-color-flush-300x180.png" alt="University of Wisconsin-Madison">
</a>
<h1 align="center">WiscO365 Module Documentation</h1></div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-12" id="navbar-id">
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse">
<span class="sr-only">Toggle</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="visible-xs navbar-brand">click menu to open</span>
</div>
<div class="navbar-collapse collapse sidebar-navbar-collapse">
<div class="form-group">
<input class="form-control" id="searchinput" type="search" placeholder="Filter..." />
</div>
<ul class="nav navbar-nav list-group" id="searchList">
<li class="nav-menu list-group-item"><a href="#GettingStarted"><strong>Getting Started</strong></a></li>
<li class="nav-menu list-group-item"><a href="#ImportantInfo"><strong>Important Information</strong></a></li>
<li class="nav-menu list-group-item"><a href="#Add-O365Connection">Add-O365Connection</a></li>
<li class="nav-menu list-group-item"><a href="#Get-O365Connections">Get-O365Connections</a></li>
<li class="nav-menu list-group-item"><a href="#Get-O365CurrentConnection">Get-O365CurrentConnection</a></li>
<li class="nav-menu list-group-item"><a href="#Get-O365DomainAdminDoc">Get-O365DomainAdminDoc</a></li>
<li class="nav-menu list-group-item"><a href="#Get-O365Help">Get-O365Help</a></li>
<li class="nav-menu list-group-item"><a href="#Remove-O365Connection">Remove-O365Connection</a></li>
<li class="nav-menu list-group-item"><a href="#Set-O365Connection">Set-O365Connection</a></li>
<li class="nav-menu list-group-item"><a href="#Set-O365StartupPreferences">Set-O365StartupPreferences</a></li>
<li class="nav-menu list-group-item"><a href="#Update-O365APIFunctions">Update-O365APIFunctions</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 col-xs-12" id="main-content-id">
<div id="GettingStarted" class="toggle_container">
<div class="page-header">
<h2> Getting Started </h2>
<p>General information and steps to use this module for the first time.</p>
<p></p>
</div>
<div>
<h3> Module Description </h3>
<p>
This module provides a turnkey solution for University of Wisconsin-Madison domain administrators to manage their domain's Office 365 accounts.
It integrates the Domain Admin API, converting all available methods to PowerShell functions for simple execution from the console or in scripts.
Functions can be added, removed, and updated as the API is modified.
Additionally, this module provides the ability to easily add, save, and manage API connection parameters for later use.
<br>
<br>
<a href="https://github.com/ejbakken/WiscO365" target="_blank">WiscO365 GitHub Repository</a>
<br>
<a href="https://www.powershellgallery.com/packages/WiscO365" target="_blank">WiscO365 PowerShell Gallery Package</a>
</p>
<br>
</div>
<div>
<h3> Get Help </h3>
<p>
After importing the module, enter the function <strong>Get-O365Help</strong> to launch this documentation.
</p>
<br>
</div>
<div>
<h3> Add a Connection </h3>
<p>
You must add at least one API connection before most functions can be used. Use the function Add-O365Connection to enter the information provided to you by the DoIT Mail Team.
If you choose to save this connection, it can be easily used in later sessions. After adding a connection, that connection is set as the current connection to be used.
All functions in the module can now be used.
<br>
<br>
<a href="https://wiscmail.wisc.edu/admin/index.php?action=domain-domainadmin_api" target="_blank">API Information & Credential Request</a>
</p>
<br>
</div>
<div>
<h3> Update API Functions </h3>
<p>
After a connection is added, use the function Update-O365APIFunctions to generate PowerShell functions for all available API methods, as defined in the
<a href="https://wiscmail.wisc.edu/admin/index.php?action=domain-domainadmin_api" target="_blank">Domain Admin API Documentation.</a>
After updating, use the function Get-O365Help to get an updated version of this document.
</p>
<br>
</div>
<div>
<h3> View Available Connections </h3>
<p>
Use the function Get-O365Connections to view all the connections that are saved and in-memory.
</p>
<br>
</div>
<div>
<h3> Set Current Connection </h3>
<p>
Use the function Set-O365Connection to set a connection to be used as the current connection. This also clears the current connection if no connection is specified.
</p>
<br>
</div>
<div>
<h3> View Current Connection </h3>
<p>
Use the function Get-O365CurrentConnection to view the connection that is set as the current connection.
</p>
<br>
</div>
<div>
<h3> Remove Connections </h3>
<p>
Use the function Remove-O365Connection to remove a connection that is saved or in-memory.
</p>
<br>
</div>
</div>
<div id="ImportantInfo" class="toggle_container">
<div class="page-header">
<h2> Important Information </h2>
<p>Useful information about the module.</p>
<p></p>
</div>
<div>
<h3> File Locations </h3>
<p>
<ul>
<li> To find the path where the module is stored, use the function <strong>(Get-Module -ListAvailable WiscO365).path</strong>. These are static files that don't change when the functions are updated. </li>
<br>
<li> Files generated by the module are stored in <strong>%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365</strong>. </li>
</ul>
</p>
</div>
<div>
<h3> Default Parameters </h3>
<p>
<ul>
<li> Default API Endpoint: https://wiscmail.wisc.edu/domainadmin.json </li>
<br>
<li> Default Domain: $Global:O365CurrentConnection.domain </li>
</ul>
</p>
</div>
<div>
<h3> Function Names </h3>
<p>
<ul>
<li> The PowerShell function names are different than the API method names in order to follow PowerShell convention, which specifies that function names must follow the format <strong>Verb-PrefixNoun</strong>. </li>
<br>
<li> For all functions, the prefix is <strong>O365</strong>. </li>
<ul>
<li> Ex: addAllowedNetID becomes Add-O365AllowedNetID. </li>
</ul>
<br>
<li> If the method originally had a prefix of MSOL, this is removed to avoid conflict with the official Office 365 PowerShell module from Microsoft. </li>
<ul>
<li> Ex: editMsolUser becomes Edit-O365User. </li>
</ul>
<br>
<li> Most verbs are identical to the original verb, but some have been changed if the original verb is not a "PowerShell-Approved" verb. However, the function has an alias with the original verb. </li>
<ul>
<li> Ex: deleteServiceAccount becomes Remove-O365ServiceAccount, which has the alias Delete-O365ServiceAccount. </li>
</ul>
<br>
<li> When updating the functions (Update-O365APIFunctions), the original name method name can be added as an alias to the function by using the switch <strong>includeAlias</strong>. </li>
</ul>
</p>
<br>
</div>
<div>
<h3> Connections </h3>
<p>
<ul>
<li> Saved connection information is stored in <strong>%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Connections\connections.csv</strong>. </li>
<br>
<li> Saved passwords are stored in <strong>%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Connections</strong> as XML files with the title synonymous to the connection ID.
Saved passwords can only be used on the computer and by the user account on which it was originally created.</li>
<br>
<li> After importing the module, connection information is stored in Global variables. </li>
<ul>
<li> $Global:O365Connections - Connection information for all connections, both saved and in-memory. </li>
<li> $Global:O365CurrentConnection - Connection information for the current connection. </li>
<li> $Global:O365Session - API session information. </li>
</ul>
<br>
<li> For functions that require a "domain" parameter, the domain specified in the current connection will be used by default, unless a different domain is specified in the function. </li>
</ul>
</p>
<br>
</div>
</div>
<div id="Add-O365Connection" class="toggle_container">
<div class="page-header">
<h2> Add-O365Connection </h2>
<p>Creates a new connection for the Office 365 API and sets it as the current connection.</p>
<p>This function allows a user to add connection properties for the API, giving them the option to save the connection for later use. The module first imports the existing connections using <br>Get-O365Connections, then checks if that connection ID already exists. If the ID already exists, an error is thrown and processing stops. Next, a new PSCredential object is created to store the credentials. <br>All the connection information is then added $Global:O365Connections. If the save option is selected, the connection information is also exported to Connections.csv and the PSCredential object is exported <br>to an XML file with a title identical to the specified ID. Both files are stored in %LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Connections. A stored password can only be used on the computer and <br>by the user account on which it was originally created. Finally, this connection is set as the current connection using Set-O365Connection.</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Add-O365Connection [-id] <String> [-userName] <String> [-password] <String> [-domain] <String> [[-endpoint] <String>] [[-save]] [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-id</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The unique id for the connection. This can be whatever the user prefers.</td>
<td class="visible-lg visible-md">true</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
<tr>
<td><nobr>-userName</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The user name for the connection. This is obtained from the DoIT Mail Team.</td>
<td class="visible-lg visible-md">true</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
<tr>
<td><nobr>-password</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The password for the connection. This is obtained from the DoIT Mail Team.</td>
<td class="visible-lg visible-md">true</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
<tr>
<td><nobr>-domain</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The domain for the connection. The specified credentials must have administrative access to this domain. This is also the value that will be used by default by functions with a "domain" parameter.</td>
<td class="visible-lg visible-md">true</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
<tr>
<td><nobr>-endpoint</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The endpoint for the connection. If not specified, the default endpoint is used.</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg">$defaultEndpoint</td>
</tr>
<tr>
<td><nobr>-save</nobr></td>
<td class="visible-lg visible-md"></td>
<td>If specified, the connection will be saved for use in later sessions. The connection can only be used on the computer and by the user account on which it was originally created. <br>If not specified, the connection can only be used during the session in which it is entered.</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg">False</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>connections.csv: Connection details for saved connections.<br>$id.xml: Encrypted password file for saved connection.<br>$Global:O365Connections: An array of all connections, both saved and temporary.</li></ul>
</div>
</div>
<div id="Get-O365Connections" class="toggle_container">
<div class="page-header">
<h2> Get-O365Connections </h2>
<p>Gets all the existing connections for the Office 365 API, both saved and in-memory.</p>
<p>This function gets all the existing connections for the Office 365 API, both saved and in-memory. It first checks that %LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Connections\Connections.csv <br>exists. If the file doesn't exist, it is created with the proper headers. Connections.csv and any password files are imported and added to $GlobalO365Connections with any temporary, in-memory connections.</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Get-O365Connections [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>An array of all existing connections is returned.</li></ul>
</div>
</div>
<div id="Get-O365CurrentConnection" class="toggle_container">
<div class="page-header">
<h2> Get-O365CurrentConnection </h2>
<p>Gets the currently selected connection.</p>
<p>Gets the currently selected connection by returning the values in $Global:O365CurrentConnection.</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Get-O365CurrentConnection [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>The details of the currently selection connection are returned.</li></ul>
</div>
</div>
<div id="Get-O365DomainAdminDoc" class="toggle_container">
<div class="page-header">
<h2> Get-O365DomainAdminDoc </h2>
<p>Gets the documentation for the Domain Admin API, which is what you are viewing right now</p>
<p></p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Get-O365DomainAdminDoc [[-domain] <Object>] [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-domain</nobr></td>
<td class="visible-lg visible-md"></td>
<td>Domain name (e.g. bar.wisc.edu)</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg">$Global:O365CurrentConnection.domain</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>failure: undef<br>success: JSON array with all Domain Admin API documentation</li></ul>
</div>
<div>
<h3> Links </h3>
<div>
<ul>
<li class=''><a href='https://wiscmail.wisc.edu/admin/index.php?action=domain-domainadmin_api' target='_blank'>https://wiscmail.wisc.edu/admin/index.php?action=domain-domainadmin_api</a></li>
</ul>
</div>
</div>
</div>
<div id="Get-O365Help" class="toggle_container">
<div class="page-header">
<h2> Get-O365Help </h2>
<p>Launches the HTML help documentation for the module.</p>
<p>If documentation has been generated using Update-O365APIFunctions ("%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\WiscO365 Help.html"), this is launched. Otherwise, the initial help document is <br>launched ("$PSScriptRoot\WiscO365 Initial Help.html").</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Get-O365Help [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>WiscO365 Help.html or WiscO365 Initial Help.html</li></ul>
</div>
</div>
<div id="Remove-O365Connection" class="toggle_container">
<div class="page-header">
<h2> Remove-O365Connection </h2>
<p>Removes an existing Office 365 API connection from memory and disk storage.</p>
<p>The function removes an existing Office 365 API connection from memory and disk storage. First, the function gets all existing connections using Get-O365Connections. If the specified connection ID doesn't <br>exist, an error is thrown and processing stops. The specified connection is removed from $Global:O365Connections. If the connection was saved, it is also removed from Connections.csv and its corresponding <br>password file is deleted. If the specified connection was set as the current connection, the current connection is cleared using Set-O365Connection.</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Remove-O365Connection [-id] <String> [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-id</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The unique id for the connection.</td>
<td class="visible-lg visible-md">true</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>Connections.csv: Connection details for saved connections (specified connection removed).<br>$id.xml: Encrypted password file for saved connection (file for specified connection removed).<br>$Global:O365Connections: An array of all connections, both saved and temporary (specified connection removed)..</li></ul>
</div>
</div>
<div id="Set-O365Connection" class="toggle_container">
<div class="page-header">
<h2> Set-O365Connection </h2>
<p>Sets an existing Office 365 API connection as the current connection or clears the current connection.</p>
<p>This function sets an existing Office 365 API connection as the current connection or clears the current connection. If the ID parameter is not specified, the current connection is cleared by setting <br>$Global:O365CurrentConnection and $Global:O365Session as $null. Otherwise, the function first gets all existing connections using Get-O365Connections. If the specified connection does not exist, an error is <br>thrown and processing stops. A new WebRequestSession object is created and stored in $Global:O365Session. The selected connection details are then stored in $Global:O365CurrentConnection..</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Set-O365Connection [[-id] <String>] [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-id</nobr></td>
<td class="visible-lg visible-md"></td>
<td>The unique id for the connection. If not specified, the current connection will be cleared.</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg"></td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>$Global:O365Session: Session information for the API.<br>$Global:O365CurrentConnection: Connection information for the selected connection.</li></ul>
</div>
</div>
<div id="Set-O365StartupPreferences" class="toggle_container">
<div class="page-header">
<h2> Set-O365StartupPreferences </h2>
<p>Sets the preference to determine if the startup menu will be shown when importing the module.</p>
<p>If the switch "showStartupMenu" is included, the startup menu will be displayed when importing the module. Otherwise, the menu will not be displayed. This preference is saved in the file <br>"%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Preferences\Startup.txt" as either "0" (don't show) or "1" (show). The startup menu is defined by the function Show-HelperO365StartupMenu in <br>"$PSScriptRoot\HelperFunctions.ps1".</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Set-O365StartupPreferences [[-showStartupMenu]] [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-showStartupMenu</nobr></td>
<td class="visible-lg visible-md"></td>
<td>Determines if the startup menu will be shown</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg">False</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>Startup.txt</li></ul>
</div>
</div>
<div id="Update-O365APIFunctions" class="toggle_container">
<div class="page-header">
<h2> Update-O365APIFunctions </h2>
<p>Updates the API functions and documentation in the module by getting the methods from the Domain Admin API Documentation.</p>
<p>This function updates the API functions and documentation in the module by getting the methods from the Domain Admin API Documentation. It first calls the script $PSScriptRoot\Update\UpdateAPIFunctions.ps1, <br>where most of the processing takes place. This gets the latest Domain Admin API Documentation from the web using the function Get-O365DomainAdminDoc. Each method found in the documentation is parsed. <br><br>First, the method name is normalized. A list of verbs is imported from "$PSScriptRoot\actionWords.csv" and the method name is matched to one of the verbs in the originalVerbs column. If the verb is not <br>found in the list, the verb is assumed to be the method name string until the first capital letter and is added to actionWords.csv for later use. If the verb is found in the list and the corresponding value <br>in the approvedVerbs column of actionWords.csv is not null, this indicates that the original verb is an unapproved PowerShell verb. This value in the approvedVerbs column is substituted as the verb, but the <br>original verb is still retained to be used in a function alias. If the original verb is an unapproved verb but has no approved verb specified, this unapproved verb is used (this has the potential to cause <br>conflicts, but this is unlikely). The original verb is trimmed from the original method name, with the remaining string assumed to be the noun. A list of unallowed words is imported from <br>"$PSScriptRoot\unallowedWords.txt". Any words in this list are trimmed from the noun. This is to prevent conflicts with functions from other modules (especially Microsoft's official Office 365 module) and <br>to keep the naming convention consistent throughout all functions in the module. Finally, the function name is generated in the form Verb-PrefixNoun. The prefix for all functions is O365. If an unapproved <br>verb existed, a name with the original verb is also generated in this form.<br><br>Next, a header is generated for the function, which includes documentation, the function name, and any aliases. The Synopsis section is set as the method purpose from the documentation. The Outputs section <br>is set as the method return from the documentation. The Link section is set to the web address for the Domain Admin API Documentation. The function name is the name value that was normalized earlier. If an <br>unapproved verb was found, a normalized name with this verb is included as an alias. If the includeAlias switch is selected, the original method name from the documentation is added as an alias.<br><br>Next, parameters are generated for the function. The parameter description is set as the parameter description from the documentation. If "required" in the documentation is "1", the Mandatory property is <br>set to $True. The exception to this is any function that contains a "domain" parameter. Regardless of the "required" value in the documentation, a "domain" parameter's Mandatory property is always set to <br>$False. This allows the user to avoid entering the "domain" value, since the "domain" value is set in the connection properties. Any "domain" parameter is set to $Global:O365CurrentConnection.domain by <br>default, unless overridden by the user specifying a different value. The parameter position is determined by the order in which the parameters appear in the documentation, with the first parameter's <br>position set as "0", the second parameter's position set as "1", etc. If the documentation contains a pre-defined set of values for the parameter, the parameter is set to validate this set of values. These <br>values are determined by looking for "|" in the parameter description and splitting the string on the "|".<br><br>Next, a JSON string is generated for the body of the API method call. This includes the original method name, parameter names, and variables for the parameter value. <br><br>The function is then formatted as an Advanced PowerShell Function, with all the previously described values included. Each function includes a call to the helper functions Test-HelperO365Connection (checks <br>that a connection has been set before calling the API method) and Invoke-HelperO365APIFunction (calls the API method using Invoke-RestMethod and processes the return values). Both of these helper functions <br>can be found at "$PSScriptRoot\HelperFunctions.ps1". A ps1 file is generated with all the functions and stored as "%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\New APIFunctions.ps1". Control is then <br>returned to the original function, Update-O365APIFunctions.<br><br>If a previous API Functions file exists as "%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\APIFunctions.ps1", this is compared to the new API Functions file. If the new API Functions file is <br>different, the old API Functions file and Help File are moved to "%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\Old API Functions" and renamed for archiving. If the new API Functions file is <br>different or if a previous file didn't exist, the new API Functions file is renamed "APIFunctions.ps1". The module is then reloaded using the function "Import-Module WiscO365 -Force -DisableNameChecking". <br>Finally, a new help file is generated for the module as "%LOCALAPPDATA%\WindowsPowerShell\ModuleData\WiscO365\WiscO365 Help.html". This is generated using the psDoc script <br>("$PSScriptRoot\Update\psDoc-master\src\psDoc.ps1"). This has been modified to include UW branding and extra sections as defined by the files docFooter.html, docTitle.html, extraBody.html, and extraNav.html <br>in "$PSScriptRoot\Update\psDoc-master\src". If the new functions file is not different, it is deleted.</p>
</div>
<div>
<h3> Syntax </h3>
</div>
<div class="panel panel-default">
<div class='panel-body'>
<pre class="brush: ps">Update-O365APIFunctions [-includeAlias] [<CommonParameters>]</pre>
</div>
</div>
<div>
<h3> Parameters </h3>
<table class="table table-striped table-bordered table-condensed visible-on">
<thead>
<tr>
<th>Name</th>
<th class="visible-lg visible-md">Alias</th>
<th>Description</th>
<th class="visible-lg visible-md">Required?</th>
<th class="visible-lg">Pipeline Input</th>
<th class="visible-lg">Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><nobr>-includeAlias</nobr></td>
<td class="visible-lg visible-md"></td>
<td>Includes the original API method name as an alias.</td>
<td class="visible-lg visible-md">false</td>
<td class="visible-lg">false</td>
<td class="visible-lg">False</td>
</tr>
</tbody>
</table>
</div>
<div>
<h3> Outputs </h3>
<p>The output type is the type of the objects that the cmdlet emits.</p>
<ul><li>If no new updates: No Updates | No new API Functions were found.<br>If new updates: Updates | New API Functions were found and added.<br> APIFunctions.ps1<br> WiscO365 Help.html</li></ul>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="container-fluid">
<p align="center">Copyright © 2017 Board of Regents of the University of Wisconsin System</p>
</div>
<br>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPowerShell.min.js" charset="utf-8"></script>
<script>
$(document).ready(function() {
$(".toggle_container").hide();
var previousId;
if(location.hash) {
var id = location.hash.slice(1); //Get rid of the # mark
var elementToShow = $("#" + id); //Save local reference
if(elementToShow.length) { //Check if the element exists
elementToShow.slideToggle('fast'); //Show the element
elementToShow.addClass("check_list_selected"); //Add class to element (the link)
}
previousId = id;
}
$('.nav-menu a, .psLink a').click(function() {
$(".sidebar-navbar-collapse").collapse('hide');
$('.toggle_container').hide(); // Hide all
var elem = $(this).prop("hash");
$(elem).toggle('fast'); // Show HREF/to/ID one
history.pushState({}, '', $(this).attr("href"));
window.scrollTo(0, 0);
return false;
});
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.defaults['gutter'] = false;
SyntaxHighlighter.all();
$('#searchList').btsListFilter('#searchinput', {itemChild: 'a', initial: false, resetOnBlur: true});
$(document).keyup(function( e ) {
if(!$('#searchinput').is(':focus') && e.which >= 65 && e.which <= 90 ){
$('#searchinput').val(String.fromCharCode(e.keyCode));
$('#searchinput').focus();
}
});
$(document).click(function() {
$('#searchinput').blur();
});
});
</script>
<!-- bootstrap-list-filter.min.js - removed as external resource and added as content -->
<script>
/*
* bootstrap-list-filter v0.1.7 - 2015-03-30
*
* Copyright 2015 Stefano Cudini
* http://labs.easyblog.it/
*
* Licensed under the MIT license.
*
* Demos:
* http://labs.easyblog.it/bootstrap-list-filter/
*
* Source:
* [email protected]:stefanocudini/bootstrap-list-filter.git
*
*/
!function(a){a.fn.btsListFilter=function(b,c){function d(a,b){return a.replace(/\{ *([\w_]+) *\}/g,function(a,c){return b[c]||""})}function e(a,b){var c;return b=b||300,function(){var d=this,e=arguments;clearTimeout(c),c=setTimeout(function(){a.apply(d,Array.prototype.slice.call(e))},b)}}var f,g=this,h=a(this),i=a(b),j=h;return c=a.extend({delay:300,minLength:1,initial:!0,eventKey:"keyup",resetOnBlur:!0,sourceData:null,sourceTmpl:'<a class="list-group-item" href="#"><span>{title}</span></a>',sourceNode:function(a){return d(c.sourceTmpl,a)},emptyNode:function(){return'<a class="list-group-item well" href="#"><span>No Results</span></a>'},itemEl:".list-group-item",itemChild:null,itemFilter:function(b,d){d=d&&d.replace(new RegExp("[({[^.$*+?\\]})]","g"),"");var e=a(b).text(),f=c.initial?"^":"",g=new RegExp(f+d,"i");return g.test(e)}},c),i.on(c.eventKey,e(function(){var b=a(this).val();c.itemEl&&(j=h.find(c.itemEl)),c.itemChild&&(j=j.find(c.itemChild));var d=j.filter(function(){return c.itemFilter.call(g,this,b)}),e=j.not(d);c.itemChild&&(d=d.parents(c.itemEl),e=e.parents(c.itemEl).hide()),""!==b&&b.length>=c.minLength?(d.show(),e.hide(),"function"===a.type(c.sourceData)?(d.hide(),e.hide(),f&&(a.isFunction(f.abort)?f.abort():a.isFunction(f.stop)&&f.stop()),f=c.sourceData.call(g,b,function(b){if(f=null,d.hide(),e.hide(),h.find(".bts-dynamic-item").remove(),b&&0!==b.length)for(var i in b)a(c.sourceNode.call(g,b[i])).addClass("bts-dynamic-item").appendTo(h);else a(c.emptyNode.call(g)).addClass("bts-dynamic-item").appendTo(h)})):0===d.length&&a(c.emptyNode.call(g)).addClass("bts-dynamic-item").appendTo(h)):(d.show(),e.show(),h.find(".bts-dynamic-item").remove())},c.delay)),c.resetOnBlur&&i.on("blur",function(){a(this).val("").trigger(c.eventKey)}),h}}(jQuery);
</script>
</body>
</html>