Skip to content
forked from ejbakken/WiscO365

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 i…

License

Notifications You must be signed in to change notification settings

prboyer/WiscO365

 
 

Repository files navigation

WiscO365

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.

Important

The module needs to be run initially with administrator permissions to properly update the list of available PowerShell cmdlet from the O365 API.

To get started, enter the function Get-O365Help after importing the module.


Add-O365AllowedNetID

Synopsis

Grants access to a NetID to administer the account; also grants delegated mailbox access

Syntax

Add-O365AllowedNetID [-addr] <Object> [-netid] <Object> [<CommonParameters>]

Add-O365AllowedNetID Aliases

  • addAllowedNetID

Parameters

Name Alias Description Required? Pipeline Input Default Value
addr Primary email address of the account to which a NetID is being granted access (e.g. [email protected]) true false
netid The NetID that should be granted access to the account (e.g. bbadger) true false

Outputs

  • failure: null
  • success: 1

Links

Add-O365Alternate

Synopsis

Adds an alternate address to an Office 365 account

Syntax

Add-O365Alternate [-alternate] <Object> [[-domain] <Object>] [-msoluid] <Object> [-sponsornetid] <Object>
[<CommonParameters>]

Add-O365Alternate Aliases

  • addAlternate

Parameters

Name Alias Description Required? Pipeline Input Default Value
alternate Fully qualified new alternate email address to add (e.g. [email protected]) true false
domain The domain of the alternate address. Must match domain in alternate value (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain
msoluid Unique ID of the account to which the alternate address should be added true false
sponsornetid The NetID of the user requesting the alternate address be assigned (e.g. bbadger) true false

Outputs

  • failure: null
  • success: 1

Links

Add-O365AuthorizedAdmin

Synopsis

Grants full administrative control over a Service Account or Resource to a NetID

Syntax

Add-O365AuthorizedAdmin [-admin] <Object> [-msoluid] <Object> [<CommonParameters>]

Add-O365AuthorizedAdmin Aliases

  • addAuthorizedAdmin

Parameters

Name Alias Description Required? Pipeline Input Default Value
admin NetID of the user to which access is being granted true false
msoluid Unique ID of the Service Account or Resource for which to grant access true false

Outputs

  • failure: null
  • success: 1

Links

Add-O365Connection

Synopsis

Creates a new connection for the Office 365 API and sets it as the current connection.

Syntax

Add-O365Connection [-id] <String> [-userName] <String> [-password] <String> [-domain] <String> [[-endpoint] <String>]
[[-save]] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
id The unique id for the connection. This can be whatever the user prefers. true false
userName The user name for the connection. This is obtained from the DoIT Mail Team. true false
password The password for the connection. This is obtained from the DoIT Mail Team. true false
domain 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. true false
endpoint The endpoint for the connection. If not specified, the default endpoint is used. false false $defaultEndpoint
save 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. If not specified, the connection can only be used during the session in which it is entered. false false False

Outputs

  • connections.csv: Connection details for saved connections.
  • $id.xml: Encrypted password file for saved connection.
  • $Global:O365Connections: An array of all connections, both saved and temporary.

Add-O365NetIDAdminAccess

Synopsis

Adds a Manifest group to administer a NetID

Syntax

Add-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]

Add-O365NetIDAdminAccess Aliases

  • addNetIDAdminAccess

Parameters

Name Alias Description Required? Pipeline Input Default Value
group Manifest group ID that is being granted administrative access over the NetID true false
netid NetID to which the Manifest group is being granted access true false

Outputs

  • failure: null
  • success: 1

Links

Add-O365Resource

Synopsis

Creates an Office 365 Resource

Syntax

Add-O365Resource [[-authorized\\_admin] <Object>] [[-description] <Object>] [-displayname] <Object> [[-domain] <Object>]
[-owner] <Object> [-resourcetype] <Object> [-sponsornetid] <Object> [-uid] <Object> [<CommonParameters>]

Add-O365Resource Aliases

  • addMsolResource

Parameters

Name Alias Description Required? Pipeline Input Default Value
authorized\\_admin (Optional) NetID (or comma-separated list of NetIDs) who will be granted full administrative control over the Resource false false
description Brief description only available from Admin Site false false
displayname Name of the resource to be displayed in most places (e.g. Foo Room) true false
domain Domain to create the resource in (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain
owner User who will be granted full permissions to the resource and granted some administrative permissions true false
resourcetype room or equipment true false
sponsornetid NetID of the person who is sponsoring creation of this resource true false
uid Left-hand side of the resource email address (e.g. foo\\_room) true false

Outputs

  • failure: null
  • success: 1

Links

Add-O365ServiceAccount

Synopsis

Creates an Office 365 Service Account in a domain that is not capable of hosting WiscMail Plus accounts

Syntax

Add-O365ServiceAccount [[-authorized\\_admin] <Object>] [[-description] <Object>] [[-domain] <Object>] [-firstname]
<Object> [[-fwd\\_addr] <Object>] [-lastname] <Object> [[-linkednetid] <Object>] [[-no\\_gapps] <Object>] [-sponsornetid]
<Object> [-uid] <Object> [[-userpassword] <Object>] [<CommonParameters>]

Add-O365ServiceAccount Aliases

  • addServiceAccount

Parameters

Name Alias Description Required? Pipeline Input Default Value
authorized\\_admin (Optional) NetID (or comma-separated list of NetIDs) who will be granted full administrative control over the Service Account false false
description Brief description only available from Admin Site false false
domain Domain to create the Service Account in (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain
firstname First name for Service Account; will be concatenated with lastname to form Display Name true false
fwd\\_addr (Optional) Forwarding address that will be applied at the time of creation false false
lastname Last name for Service Account; will be concatenated with firstname to form Display Name true false
linkednetid (Optional) NetID (or comma-separated list of NetIDs) who will be granted full permissions to the Service Account and granted some administrative permissions false false
no\\_gapps (Optional - Deprecated) If given, the Service Account will not be enabled for Google Apps false false
sponsornetid NetID of the person who is sponsoring creation of this Service Account true false
uid Left-hand side of the Service Account email address (e.g. foo) true false
userpassword (Optional) Password for the Service Account; must meet the password policy criteria. A secure random password will be generated if none is given. false false

Outputs

  • failure: null
  • success: 1

Links

Disable-O365OutlookAutomapping

Synopsis

Removes the automapping from Outlook for all users that currently have Full Mailbox permission

Syntax

Disable-O365OutlookAutomapping [-msoluid] <Object> [<CommonParameters>]

Disable-O365OutlookAutomapping Aliases

  • disableMsolOutlookAutomapping

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the Service Account from which to remove all existing automapping settings true false

Outputs

  • failure: null
  • success: 1

Links

Edit-O365Profile

Synopsis

Add or update profile attributes for a Service Account

Syntax

Edit-O365Profile [[-company] <Object>] [[-department] <Object>] [[-facsimiletelephonenumber] <Object>] [[-homephone]
<Object>] [[-mobile] <Object>] [-msoluid] <Object> [[-physicaldeliveryofficename] <Object>] [[-postalcode] <Object>]
[[-telephonenumber] <Object>] [[-title] <Object>] [<CommonParameters>]

Edit-O365Profile Aliases

  • editMsolProfile

Parameters

Name Alias Description Required? Pipeline Input Default Value
company Company value false false
department Department value false false
facsimiletelephonenumber Business Fax value false false
homephone Home phone number value false false
mobile Mobile phone number value false false
msoluid Unique identifier for the Service Account true false
physicaldeliveryofficename Business Address street value false false
postalcode Business Address postcal code value false false
telephonenumber Business phone number value false false
title Job Title value false false

Outputs

  • failure: null
  • success: 1

Links

Edit-O365Resource

Synopsis

Change the name or owner of an Office 365 Resource

Syntax

Edit-O365Resource [-description] <Object> [-msoluid] <Object> [-name] <Object> [-owner] <Object> [<CommonParameters>]

Edit-O365Resource Aliases

  • editMsolResource

Parameters

Name Alias Description Required? Pipeline Input Default Value
description Brief description only available from Admin Site true false
msoluid Unique ID of the Resource to edit (e.g. foo\\_room\\_bar) true false
name The Display Name of the resource; required, but does not need to change true false
owner User who will be granted full permissions to the resource and granted some administrative permissions; required, but does not need to change true false

Outputs

  • failure: null
  • success: 1

Links

Edit-O365User

Synopsis

Change the first or last name of an Office 365 Service Account

Syntax

Edit-O365User [[-description] <Object>] [[-firstname] <Object>] [[-lastname] <Object>] [-msoluid] <Object>
[<CommonParameters>]

Edit-O365User Aliases

  • editMsolUser

Parameters

Name Alias Description Required? Pipeline Input Default Value
description Brief description only available from Admin Site false false
firstname First name for Service Account; will be concatenated with lastname to form Display Name; required, but does not need to change false false
lastname Last name for Service Account; will be concatenated with firstname to form Display Name; required, but does not need to change false false
msoluid Unique ID of the Service Account to edit (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Get-O365AccountAddresses

Synopsis

Gets the full list of email addresses applied to an account

Syntax

Get-O365AccountAddresses [-msoluid] <Object> [<CommonParameters>]

Get-O365AccountAddresses Aliases

  • getAccountAddresses

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account to get addresses on (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: List of email addresses on an account

Links

Get-O365AccountChangelog

Synopsis

Returns a list of modifications made to an account

Syntax

Get-O365AccountChangelog [[-change\\_types] <Object>] [-msoluid] <Object> [<CommonParameters>]

Get-O365AccountChangelog Aliases

  • getAccountChangelog

Parameters

Name Alias Description Required? Pipeline Input Default Value
change\\_types Optional comma-separated list of change keys (e.g. create\\_account) false false
msoluid Unique ID of the account for which to get change logs (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: List of changes to an account with a change\_type, change\_description, and timestamp

Links

Get-O365AccountSourcesystem

Synopsis

Get the system that an account is hosted on

Syntax

Get-O365AccountSourcesystem [-account] <Object> [<CommonParameters>]

Get-O365AccountSourcesystem Aliases

  • get_account_sourcesystem

Parameters

Name Alias Description Required? Pipeline Input Default Value
account A unique identifier of the account, such as unique ID or primary email address (e.g. foo\\_bar or [email protected]) true false

Outputs

  • failure: null (if unknown or not-existent)
  • success: wiscmail|office365|external

Links

Get-O365AccountState

Synopsis

Get information about a Service Account or WiscMail Plus account in a domain you administer

Syntax

Get-O365AccountState [-account] <Object> [[-to\\_return] <Object>] [<CommonParameters>]

Get-O365AccountState Aliases

  • get_account_state

Parameters

Name Alias Description Required? Pipeline Input Default Value
account A unique identifier of the account, such as unique ID or primary email address (e.g. foo\\_bar or [email protected]) true false
to\\_return [Optional] Data to return, comma-separated; options are: exists, sourcesystem, eligibility, primary, readiness false false

Outputs

  • failure: null
  • success
  • exists: 1 if account exists, undef if not
  • msol\_uid: Unique ID of the account (e.g. foo\_bar)
  • readiness: a hash with a wide array of data about preparedness to migrate account to Office 365
  • sourcesystem: wiscmail|office365|external

Links

Get-O365AccountTransitionInfo

Synopsis

Get information about when and how an account transitioned to Office 365, if available

Syntax

Get-O365AccountTransitionInfo [-msoluid] <Object> [<CommonParameters>]

Get-O365AccountTransitionInfo Aliases

  • getAccountTransitionInfo

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account to get transition information about (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: Transition timestamp and if the account was force transitioned

Links

Get-O365AdminGroups

Synopsis

Gets a list of Manifest groups that have administrative access to a NetID

Syntax

Get-O365AdminGroups [-netid] <Object> [<CommonParameters>]

Get-O365AdminGroups Aliases

  • getAdminGroups

Parameters

Name Alias Description Required? Pipeline Input Default Value
netid The NetID for which to get the list of groups with administrative access true false

Outputs

  • failure: null
  • success: List of groups with access or pending access; pending groups will show as PENDING in the response

Links

Get-O365AdministeredObjects

Synopsis

Provides a list of objects that the authenticated user can administer

Syntax

Get-O365AdministeredObjects [<CommonParameters>]

Get-O365AdministeredObjects Aliases

  • getAdministeredObjects

Outputs

  • failure: null
  • success: A list of objects and basic details about the objects

Links

Get-O365AllowedNetID

Synopsis

Gets list of NetIDs that have access to administer the Service Account; these NetIDs also have full mailbox access

Syntax

Get-O365AllowedNetID [-addr] <Object> [<CommonParameters>]

Get-O365AllowedNetID Aliases

  • getAllowedNetID

Parameters

Name Alias Description Required? Pipeline Input Default Value
addr Address of the Service Account for which to get allowed NetIDs (e.g. [email protected]) true false

Outputs

  • failure: null
  • success: A list of NetIDs that have administrative access; list may be empty if there are none

Links

Get-O365AuthorizedAdmins

Synopsis

Gets list of NetIDs that have full administrative access over the Service Account or Resource

Syntax

Get-O365AuthorizedAdmins [-msoluid] <Object> [<CommonParameters>]

Get-O365AuthorizedAdmins Aliases

  • getAuthorizedAdmins

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the Service Account or Resource for which to get authorized administrators true false

Outputs

  • failure: null
  • success: List of NetIDs; empty list if none

Links

Get-O365AuthorizedByAdmin

Synopsis

Gets list of Service Accounts and/or Resources that the NetID has administrative access over

Syntax

Get-O365AuthorizedByAdmin [[-acct\\_type] <Object>] [-msoluid] <Object> [<CommonParameters>]

Get-O365AuthorizedByAdmin Aliases

  • getAuthorizedByAdmin

Parameters

Name Alias Description Required? Pipeline Input Default Value
acct\\_type [optional] String identifying account types to return; examples: 'service', 'resource', or 'service and resource', 'all'. Defaults to 'service' if not given. false false
msoluid Unique ID (NetID) of the account for which to get a list of Service Accounts and/or Resources administered true false

Outputs

  • failure: null
  • success: List of Service Accounts and/or Resources; empty list if none

Links

Get-O365BasicAuthPolicy

Synopsis

Get the status of Office 365 basic authentication for a Service Account

Syntax

Get-O365BasicAuthPolicy [[-detail] <Object>] [-msoluid] <Object> [<CommonParameters>]

Get-O365BasicAuthPolicy Aliases

  • getMsolBasicAuthPolicy

Parameters

Name Alias Description Required? Pipeline Input Default Value
detail [Optional] Will a complex response with additional details about the basic auth policy for this account false false
msoluid Unique ID of the account for which to get Office 365 Basic Auth policy (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: Returns the string 'Blocked' if Basic Authentication is disallowed, or the string 'Allowed' if Basic
  • Authentication is allowed

Links

Get-O365CalendarConfiguration

Synopsis

Get a calendar configuration details

Syntax

Get-O365CalendarConfiguration [[-include\\_metadata] <Object>] [[-request\\_params] <Object>] [-resource\\_email] <Object>
[<CommonParameters>]

Get-O365CalendarConfiguration Aliases

  • getCalendarConfiguration

Parameters

Name Alias Description Required? Pipeline Input Default Value
include\\_metadata If defined, the return value will include metadata false false
request\\_params Parameters to get the calendar configuration for false false
resource\\_email The email address of the resource for which to get configuration details true false

Outputs

  • failure: null
  • success: A set of keys and values with the configuration settings

Links

Get-O365CalendarPermission

Synopsis

Get the Calendar permissions on an Office 365 Service Account or Resource

Syntax

Get-O365CalendarPermission [-msoluid] <Object> [<CommonParameters>]

Get-O365CalendarPermission Aliases

  • getMsolCalendarPermission

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get calendar permissions (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: An array of permissions with the following key/values: user (string, display name of the user with
  • permissions), rights (string, comma-separated list of permissions for the user); returns empty array if none

Links

Get-O365CalendarProcessing

Synopsis

Details about how Exchange Online handles resource calendar events

Syntax

Get-O365CalendarProcessing [[-include\\_metadata] <Object>] [[-request\\_params] <Object>] [-resource\\_email] <Object>
[<CommonParameters>]

Get-O365CalendarProcessing Aliases

  • getCalendarProcessing

Parameters

Name Alias Description Required? Pipeline Input Default Value
include\\_metadata (Optional) Include details about the paramater, including acceptable values that it can be set to false false
request\\_params [Optional] Comma-separated or array of calendar processing values for which to request about the resource; if not provided, all available data is returned false false
resource\\_email Email address of the O365 resource for which to get calendar processing information (e.g. foo\\[email protected]) true false

Outputs

  • failure: null
  • success: Array of parameters requested (or all if none requested); each item will include key/value pairs with name,
  • value, updating, and metadata (if requested)

Links

Get-O365Connections

Synopsis

Gets all the existing connections for the Office 365 API, both saved and in-memory.

Syntax

Get-O365Connections [<CommonParameters>]

Outputs

  • An array of all existing connections is returned.

Get-O365ContextAllowedMethods

Synopsis

Gives a list of methods available based on the provided context

Syntax

Get-O365ContextAllowedMethods [[-context] <Object>] [<CommonParameters>]

Get-O365ContextAllowedMethods Aliases

  • getContextAllowedMethods

Parameters

Name Alias Description Required? Pipeline Input Default Value
context An identifier for the object you want to get available methods on, such as foo\\_bar, or bar.wisc.edu false false

Outputs

  • failure: null
  • success: A list of methods avaialble based on the context given

Links

Get-O365CurrentConnection

Synopsis

Gets the currently selected connection.

Syntax

Get-O365CurrentConnection [<CommonParameters>]

Outputs

  • The details of the currently selection connection are returned.

Get-O365DomainAdminDoc

Synopsis

Gets the documentation for the Domain Admin API, which is what you are viewing right now

Syntax

Get-O365DomainAdminDoc [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainAdminDoc Aliases

  • getDomainAdminDoc

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain name (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: JSON array with all Domain Admin API documentation

Links

Get-O365DomainAlternates

Synopsis

Gets a list of Office 365 alternate addresses in a domain

Syntax

Get-O365DomainAlternates [[-all\\_addresses] <Object>] [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainAlternates Aliases

  • getDomainAlternates

Parameters

Name Alias Description Required? Pipeline Input Default Value
all\\_addresses [Optional] If given, return all addresses on returned accounts false false
domain Domain for which to get a list of alternate addresses (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success
  • unique\_id
  • account\_type: Type of account that the alternate address is applied to (e.g. Service Account|NetID)
  • addresses: Hash; key is alternate addresses in the domain requested
  • can\_set\_primary: 1 if the authenticated user may set the primary address on the account; 0 if not
  • default: 1 if the address is the default address for the account (cannot be removed); 0 if not
  • domain: Domain of the account that the alternate address is applied to
  • primary: 1 if the address is the primary address for the account it is applied to; 0 if not
  • uid: NetID or Unique ID of the account that the alternate address is applied to

Links

Get-O365DomainChangelog

Synopsis

Returns a list of modifications made to a domain

Syntax

Get-O365DomainChangelog [[-change\\_types] <Object>] [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainChangelog Aliases

  • getDomainChangelog

Parameters

Name Alias Description Required? Pipeline Input Default Value
change\\_types Optional comma-separated list of change keys (e.g. edit\\_properties) false false
domain Domain for which to get change logs (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: List of changes to a domain with a change\_type, change\_description, and timestamp

Links

Get-O365DomainLinkedAccounts

Synopsis

Returns a list of accounts that with linked NetIDs in the domain

Syntax

Get-O365DomainLinkedAccounts [[-domain] <Object>] [[-netid] <Object>] [<CommonParameters>]

Get-O365DomainLinkedAccounts Aliases

  • getDomainLinkedAccounts

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain for which to get linked NetIDs (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain
netid (Optional) If given, returns only accounts linked to the NetID in this domain false false

Outputs

  • failure: null
  • success: List of objects that includes account identifier and linked NetID(s)

Links

Get-O365DomainResources

Synopsis

Get a list of Office 365 Resources in a domain

Syntax

Get-O365DomainResources [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainResources Aliases

  • getO365DomainResources

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain for which to get a list of Office 365 resources (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success
  • description: Description
  • displayname: Primary identifier of the resource in the GAL and in events (e.g. Foo Room)
  • mail: Email address for the resource (e.g. [email protected])
  • msol\_uid: Unique ID for the resource (e.g. foo-room\_bar)

Links

Get-O365DomainSecurityLockedAccounts

Synopsis

Returns a list of Service Accounts that have been security locked

Syntax

Get-O365DomainSecurityLockedAccounts [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainSecurityLockedAccounts Aliases

  • getDomainSecurityLockedAccounts

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain in which to get list of locked accounts (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: List of unique IDs for locked accounts and timestamp indicating when the account was locked

Links

Get-O365DomainUsersInfo

Synopsis

Get a list of all accounts in a domain and some details about each

Syntax

Get-O365DomainUsersInfo [[-domain] <Object>] [<CommonParameters>]

Get-O365DomainUsersInfo Aliases

  • getDomainUsersInfo

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain for which to get a list accounts and information (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success
  • accounttype: user|role|alias|service
  • description: example description
  • givenname: Foo
  • mailquota: 1000M
  • netid: foo
  • surname: Bar

Links

Get-O365Forward

Synopsis

Get the forwarding address (if any) on a Service Account

Syntax

Get-O365Forward [-msoluid] <Object> [<CommonParameters>]

Get-O365Forward Aliases

  • getMsolForward

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get the forward (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: forward if present or an empty string if none

Links

Get-O365GALStatus

Synopsis

Determine whether an account is visible in or hidden from the Office 365 Global Address List (GAL)

Syntax

Get-O365GALStatus [-msoluid] <Object> [<CommonParameters>]

Get-O365GALStatus Aliases

  • getO365GALStatus

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get GAL search status (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: visible|hidden

Links

Get-O365Help

Synopsis

Launches the HTML help documentation for the module.

Syntax

Get-O365Help [<CommonParameters>]

Outputs

  • WiscO365 Help.html or WiscO365 Initial Help.html

Get-O365InboxRules

Synopsis

Get the inbox rules (if any) on a Service Account

Syntax

Get-O365InboxRules [-msoluid] <Object> [<CommonParameters>]

Get-O365InboxRules Aliases

  • getMsolInboxRules

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get inbox rules (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: An array of Inbox rules with the following key/values: name (string), priority (integer), conditions (array,
  • list of conditions that triggers the rule), actions (array, actions to take on message); returns empty array if none

Links

Get-O365JunkFilters

Synopsis

Get the junk mail filter settings for a Service Account

Syntax

Get-O365JunkFilters [-msoluid] <Object> [<CommonParameters>]

Get-O365JunkFilters Aliases

  • getMsolJunkFilters

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get junk mail filters (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: enabled: 1|0, trust\_contacts: 1|0, only\_trust\_lists: 1|0, trusted\_senders: array of addresses or domains,
  • blocked\_senders: array of addresses or domains

Links

Get-O365LinkedAccounts

Synopsis

Obtain a list of Service Accounts that are linked to a NetID

Syntax

Get-O365LinkedAccounts [-netid] <Object> [<CommonParameters>]

Get-O365LinkedAccounts Aliases

  • getLinkedAccounts

Parameters

Name Alias Description Required? Pipeline Input Default Value
netid NetID of the account for which to obtain the list of linked Service Accounts true false

Outputs

  • failure: null
  • success: List of Service Accounts; list will be empty if none

Links

Get-O365MailboxLogins

Synopsis

Get information about protocols and clients being used to access a mailbox.

Syntax

Get-O365MailboxLogins [[-days] <Object>] [[-days\\_ago] <Object>] [-msoluid] <Object> [<CommonParameters>]

Get-O365MailboxLogins Aliases

  • getMsolMailboxLogins

Parameters

Name Alias Description Required? Pipeline Input Default Value
days [Optional] Number of days of data to request false false
days\\_ago [Optional] The latest day to get information about (number of days ago) false false
msoluid The unique ID of the account for which to get mailbox access information true false

Outputs

  • failure: null
  • success: A list of successful mailbox logins by owner; each item includes the IP of the client, the client user agent
  • string, and a timestamp of the login

Links

Get-O365MailboxPermission

Synopsis

Retrieve mailbox permissions on an Office 365 account

Syntax

Get-O365MailboxPermission [-msoluid] <Object> [<CommonParameters>]

Get-O365MailboxPermission Aliases

  • getMsolMailboxPermission

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get mailbox permissions (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success
  • result
  • fullMailbox: list of users with Full Mailbox permission
  • sendAs: list of users with Send As permission
  • sendOnBehalf: list of users with Send On Behalf permission

Links

Get-O365MobileDevices

Synopsis

Gets a list of mobile devices that have been granted access to connect with Exchange Active Sync to an O365 account

Syntax

Get-O365MobileDevices [-msoluid] <Object> [<CommonParameters>]

Get-O365MobileDevices Aliases

  • getMsolMobileDevices

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get connected mobile devices (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: Returns an array of clients that have been connected to the account. Each returned client has some
  • information about it.

Links

Get-O365PasswordChangeHistory

Synopsis

Provides a list of occurrences when the password has changed for a Service Account

Syntax

Get-O365PasswordChangeHistory [-msoluid] <Object> [<CommonParameters>]

Get-O365PasswordChangeHistory Aliases

  • getPasswordChangeHistory

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get the password change history (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: A list of changes with a timestamp and user for each

Links

Get-O365PrimaryAddress

Synopsis

Gets the primary address for an account from Office 365

Syntax

Get-O365PrimaryAddress [-msoluid] <Object> [<CommonParameters>]

Get-O365PrimaryAddress Aliases

  • getMsolPrimaryAddress

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get the primary address (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: Primary address for the given account

Links

Get-O365Profile

Synopsis

Get profile information (address, phone numbers, etc) about a Service Account

Syntax

Get-O365Profile [-msoluid] <Object> [<CommonParameters>]

Get-O365Profile Aliases

  • getMsolProfile

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the Service Account true false

Outputs

  • failure: null
  • success: key/value pairs with profile information

Links

Get-O365ResourceFullAccess

Synopsis

Get a list of users that have full access to an Office 365 resource

Syntax

Get-O365ResourceFullAccess [-msoluid] <Object> [<CommonParameters>]

Get-O365ResourceFullAccess Aliases

  • getMsolResourceFullAccess

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the resource (e.g. room\\_1234\\_foo) true false

Outputs

  • failure: null
  • success: List of users that have full access and the source of that access (e.g. resource owner or granted to the user)

Links

Get-O365ResourceInfo

Synopsis

Get basic details about an Office 365 Resource

Syntax

Get-O365ResourceInfo [-msoluid] <Object> [<CommonParameters>]

Get-O365ResourceInfo Aliases

  • getMsolResourceInfo

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the resource for which to get details (e.g. room\\_bar) true false

Outputs

  • failure: null
  • success: Resource name, email address, description, and type

Links

Get-O365UnlinkedAccounts

Synopsis

Get a list of accounts in a domain that are not linked to any NetID

Syntax

Get-O365UnlinkedAccounts [[-domain] <Object>] [<CommonParameters>]

Get-O365UnlinkedAccounts Aliases

  • getUnlinkedAccounts

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain for which to get a list of unlinked accounts (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: List of accounts in the domain that have no linked NetIDs; return value is left-hand side of email address
  • (e.g. foo)

Links

Get-O365UserInfo

Synopsis

(Deprecated) Get information about a specific account in a domain; intended for Prep Accounts

Syntax

Get-O365UserInfo [-msoluid] <Object> [<CommonParameters>]

Get-O365UserInfo Aliases

  • getUserInfo

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to get details (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: Key->value pairs for directory information about account; note: Service Accounts will not include all
  • alternate address values -- use getAccountAddresses

Links

Get-O365UsersByDomain

Synopsis

Gets a list of accounts in a domain

Syntax

Get-O365UsersByDomain [[-domain] <Object>] [<CommonParameters>]

Get-O365UsersByDomain Aliases

  • getUsersByDomain

Parameters

Name Alias Description Required? Pipeline Input Default Value
domain Domain for which to get a list of accounts (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: List of accounts in the domain; return value is the left-hand side of the email address (e.g. foo)

Links

Move-O365Alternate

Synopsis

Reassigns an existing alternate address on one account to another account

Syntax

Move-O365Alternate [-alternate] <Object> [[-domain] <Object>] [-msoluid] <Object> [<CommonParameters>]

Move-O365Alternate Aliases

  • reassignAlternate
  • Reassign-O365Alternate

Parameters

Name Alias Description Required? Pipeline Input Default Value
alternate The alternate address that is currently assigned to some account that should be reassigned to another account (e.g. [email protected]) true false
domain The domain of the alternate address. Must match domain in alternate value (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain
msoluid Unique ID of the new account to which the alternate address should be added (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Remove-O365AllowedNetID

Synopsis

Revokes access from a NetID to administer the account; also removes delegated mailbox access

Syntax

Remove-O365AllowedNetID [-addr] <Object> [-netid] <Object> [<CommonParameters>]

Remove-O365AllowedNetID Aliases

  • removeAllowedNetID

Parameters

Name Alias Description Required? Pipeline Input Default Value
addr Primary email address of the account from which a NetID is being revoked access (e.g. [email protected]) true false
netid The NetID that should have access revoked from the account (e.g. bbadger) true false

Outputs

  • failure: null
  • success: 1

Links

Remove-O365Alternate

Synopsis

Removes an alternate address from an Office 365 account

Syntax

Remove-O365Alternate [-alternate] <Object> [[-domain] <Object>] [<CommonParameters>]

Remove-O365Alternate Aliases

  • removeAlternate

Parameters

Name Alias Description Required? Pipeline Input Default Value
alternate Alternate email address to remove (e.g. [email protected]) true false
domain The domain of the alternate address. Must match domain in alternate value (e.g. bar.wisc.edu) false false $Global:O365CurrentConnection.domain

Outputs

  • failure: null
  • success: 1

Links

Remove-O365AuthorizedAdmin

Synopsis

Revokes administrative control over a Service Account or Resource from a NetID

Syntax

Remove-O365AuthorizedAdmin [-admin] <Object> [-msoluid] <Object> [<CommonParameters>]

Remove-O365AuthorizedAdmin Aliases

  • removeAuthorizedAdmin

Parameters

Name Alias Description Required? Pipeline Input Default Value
admin NetID of the user from which access is being revoked true false
msoluid Unique ID of the Service Account or Resource to which access is being revoked true false

Outputs

  • failure: null
  • success: 1

Links

Remove-O365Connection

Synopsis

Removes an existing Office 365 API connection from memory and disk storage.

Syntax

Remove-O365Connection [-id] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
id The unique id for the connection. true false

Outputs

  • Connections.csv: Connection details for saved connections (specified connection removed).
  • $id.xml: Encrypted password file for saved connection (file for specified connection removed).
  • $Global:O365Connections: An array of all connections, both saved and temporary (specified connection removed)..

Remove-O365NetIDAdminAccess

Synopsis

Revokes access from a Manifest group to administer a NetID

Syntax

Remove-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]

Remove-O365NetIDAdminAccess Aliases

  • removeNetIDAdminAccess

Parameters

Name Alias Description Required? Pipeline Input Default Value
group Manifest group ID that is being revoked administrative access over the NetID true false
netid NetID to which the Manifest group is being revoked access true false

Outputs

  • failure: null
  • success: 1

Links

Remove-O365Resource

Synopsis

Deletes an Office 365 Resource

Syntax

Remove-O365Resource [-msoluid] <Object> [<CommonParameters>]

Remove-O365Resource Aliases

  • deleteMsolResource
  • Delete-O365Resource

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the Resource to delete (e.g. foo\\_room\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Remove-O365ServiceAccount

Synopsis

Deletes an Office 365 Service Account

Syntax

Remove-O365ServiceAccount [-msoluid] <Object> [<CommonParameters>]

Remove-O365ServiceAccount Aliases

  • Delete-O365ServiceAccount
  • deleteServiceAccount

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the Service Account to delete (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Repair-O365MailboxPermissions

Synopsis

Compares permissions assigned locally and in Office 365 to check for inconsistencies and (optionally) repairs the inconsistencies

Syntax

Repair-O365MailboxPermissions [-msoluid] <Object> [[-notify\\_email] <Object>] [-repair\\_action] <Object>
[<CommonParameters>]

Repair-O365MailboxPermissions Aliases

  • repairMsolMailboxPermissions

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account on which to run the permission validation and repair true false
notify\\_email Email address to which the results should be sent. Note that this is the only way you will see the results of calls to this method. false false
repair\\_action Must be one of: add, remove, use\\_local, use\\_o365, or notify. Option 'add' applies any permissions missing from either source. Option 'remove' removes any permissions missing from either source. Option 'use\\_local' will apply is stored locally to O365. Option 'use\\_o365' will apply what is in O365 to local permissions. Option 'notify' will send an email with inconsistent permissions to the 'notify\\_email' value given which is required for this option. true false

Outputs

  • failure: If queuing the job fails, you will receive a null result.
  • success: Successfully queuing the job to validate permissions will result in a response of 1.

Links

Request-O365NetIDAdminAccess

Synopsis

Requests administrative access over a NetID for a Manifest group

Syntax

Request-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]

Request-O365NetIDAdminAccess Aliases

  • requestNetIDAdminAccess

Parameters

Name Alias Description Required? Pipeline Input Default Value
group Manifest group ID for which administrative access is being requested true false
netid NetID to which the Manifest group is requesting administrative access true false

Outputs

  • failure: null
  • success: 1

Links

Reset-O365Password

Synopsis

Change the password for an account

Syntax

Reset-O365Password [-msoluid] <Object> [[-password] <Object>] [<CommonParameters>]

Reset-O365Password Aliases

  • resetPassword

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which the password is being changed (e.g. foo\\_bar) true false
password [Optional] New password for the account; must meet password policy requirements. If no password is provided, a random password is generated and not returned. false false

Outputs

  • failure: null
  • success: 1

Links

Search-O365Objects

Synopsis

Find a list of objects that the authenticated account can administer based on a search string

Syntax

Search-O365Objects [-search\\_string] <Object> [<CommonParameters>]

Search-O365Objects Aliases

  • searchObjects

Parameters

Name Alias Description Required? Pipeline Input Default Value
search\\_string Objects matching this search\\_string will be returned, including name, email address, or unique ID true false

Outputs

  • failure: null
  • success: A list of objects and basic details about the objects that match the search\_string

Links

Set-O365BasicAuthPolicy

Synopsis

Set the status of Office 365 basic authentication for a Service Account

Syntax

Set-O365BasicAuthPolicy [[-enable] <Object>] [-msoluid] <Object> [<CommonParameters>]

Set-O365BasicAuthPolicy Aliases

  • setMsolBasicAuthPolicy

Parameters

Name Alias Description Required? Pipeline Input Default Value
enable Use '1' or anything that will evaluate to true to allow basic authentication, or 0, null, or any other false value to disallow basic auth false false
msoluid Unique ID of the account for which to set Office 365 Basic Auth policy (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365CalendarConfiguration

Synopsis

Change a calendar configuration details

Syntax

Set-O365CalendarConfiguration [-param\\_name] <Object> [-param\\_value] <Object> [-resource\\_email] <Object>
[<CommonParameters>]

Set-O365CalendarConfiguration Aliases

  • setCalendarConfiguration

Parameters

Name Alias Description Required? Pipeline Input Default Value
param\\_name The parameter to change configuration for true false
param\\_value The value that should be set for the parameter given true false
resource\\_email The email address of the resource that is being modified true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365CalendarProcessing

Synopsis

Change the calendar processing configuration for an Office 365 calendar

Syntax

Set-O365CalendarProcessing [-param\\_name] <Object> [-param\\_value] <Object> [-resource\\_email] <Object>
[<CommonParameters>]

Set-O365CalendarProcessing Aliases

  • setCalendarProcessing

Parameters

Name Alias Description Required? Pipeline Input Default Value
param\\_name Value that will be set for the parameter supplied true false
param\\_value Case-sensitive name of the parameter to set or change; use getCalendarProcessing with include\\_metadata to get acceptable values with parameter names true false
resource\\_email Email address of the resource for which to change calendar processing configuration true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365Connection

Synopsis

Sets an existing Office 365 API connection as the current connection or clears the current connection.

Syntax

Set-O365Connection [[-id] <String>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
id The unique id for the connection. If not specified, the current connection will be cleared. false false

Outputs

  • $Global:O365Session: Session information for the API.
  • $Global:O365CurrentConnection: Connection information for the selected connection.

Set-O365Forward

Synopsis

Set the forwarding address on a Service Account

Syntax

Set-O365Forward [[-forward] <Object>] [-msoluid] <Object> [<CommonParameters>]

Set-O365Forward Aliases

  • setMsolForward

Parameters

Name Alias Description Required? Pipeline Input Default Value
forward [Optional] If this parameter is included, the forward will be set to the given address. Absence of forward will remove any existing forward on the account. false false
msoluid Unique ID of the account for which to set the forward (e.g. foo\\_bar) true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365GALStatus

Synopsis

Changes the Office 365 Global Address List (GAL) searchable status for a Service Account

Syntax

Set-O365GALStatus [-msoluid] <Object> [-status] <Object> [<CommonParameters>]

Set-O365GALStatus Aliases

  • setO365GALStatus

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for GAL status is being changed (e.g. foo\\_bar) true false
status show|hide true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365MailboxPermission

Synopsis

Add or remove mailbox permissions on an Office 365 account; Full, Send As, or Send on Behalf

Syntax

Set-O365MailboxPermission [-delegate\\_account] <Object> [-permission] <Object> [-set\\_type] <Object> [-target\\_account]
<Object> [<CommonParameters>]

Set-O365MailboxPermission Aliases

  • setMsolMailboxPermission

Parameters

Name Alias Description Required? Pipeline Input Default Value
delegate\\_account Unique identifier of the account that is having permissions granted or revoked true false
permission full|sendas|sendonbehalf true false
set\\_type add|remove true false
target\\_account Unique identifier of the account to which the delegate account is gaining or losing permissions true false

Outputs

  • failure: null
  • success: ID of the PowerShell job that was queued to change the permission

Links

Set-O365MailboxPolicy

Synopsis

Update the mailbox policy for an Office 365 account; used to restrict forwarding for example

Syntax

Set-O365MailboxPolicy [-msoluid] <Object> [-policy] <Object> [<CommonParameters>]

Set-O365MailboxPolicy Aliases

  • setMsolMailboxPolicy

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account (e.g. foo\\_bar) true false
policy Identifier of the policy to apply to the account (e.g. default or no\\_forward) true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365MailPrimaryAddress

Synopsis

DEPRECATED; use setMsolPrimaryAddress - Set the primary email address on a Service Account

Syntax

Set-O365MailPrimaryAddress [-msoluid] <Object> [-primary\\_address] <Object> [<CommonParameters>]

Set-O365MailPrimaryAddress Aliases

  • setMailPrimaryAddress

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account for which to set the primary address (e.g. foo\\_bar) true false
primary\\_address Email address that should be set as the primary address on the account; must be a valid email address already assigned to the account (e.g. [email protected]) true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365PrimaryAddress

Synopsis

Set the primary email address on a NetID or Service Account

Syntax

Set-O365PrimaryAddress [-msoluid] <Object> [-primary\\_address] <Object> [<CommonParameters>]

Set-O365PrimaryAddress Aliases

  • setMsolPrimaryAddress

Parameters

Name Alias Description Required? Pipeline Input Default Value
msoluid Unique ID of the account true false
primary\\_address Email address that should be set as the primary address on the account; must be a valid email address already assigned to the account (e.g. [email protected]) true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365ResourceFullAccess

Synopsis

Add or remove full access to an Office 365 resource.

Syntax

Set-O365ResourceFullAccess [-delegate\\_account] <Object> [-resource\\_msoluid] <Object> [-set\\_type] <Object>
[<CommonParameters>]

Set-O365ResourceFullAccess Aliases

  • setMsolResourceFullAccess

Parameters

Name Alias Description Required? Pipeline Input Default Value
delegate\\_account Account to receive or remove access from the resource true false
resource\\_msoluid Unique ID of the resource (e.g. room\\_1234\\_foo) true false
set\\_type Defines whether permission is being added or removed, must be add or reomve true false

Outputs

  • failure: null
  • success: 1

Links

Set-O365StartupPreferences

Synopsis

Sets the preference to determine if the startup menu will be shown when importing the module.

Syntax

Set-O365StartupPreferences [[-showStartupMenu]] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
showStartupMenu Determines if the startup menu will be shown false false False

Outputs

  • Startup.txt

Update-O365APIFunctions

Synopsis

Updates the API functions and documentation in the module by getting the methods from the Domain Admin API Documentation.

Syntax

Update-O365APIFunctions [-includeAlias] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
includeAlias Includes the original API method name as an alias. false false False

Outputs

  • If no new updates: No Updates | No new API Functions were found.
  • If new updates: Updates | New API Functions were found and added.
  • APIFunctions.ps1
  • WiscO365 Help.html

About

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 i…

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 56.3%
  • PowerShell 43.7%