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.
- WiscO365
- Add-O365AllowedNetID
- Add-O365Alternate
- Add-O365AuthorizedAdmin
- Add-O365Connection
- Add-O365NetIDAdminAccess
- Add-O365Resource
- Add-O365ServiceAccount
- Disable-O365OutlookAutomapping
- Edit-O365Profile
- Edit-O365Resource
- Edit-O365User
- Get-O365AccountAddresses
- Get-O365AccountChangelog
- Get-O365AccountSourcesystem
- Get-O365AccountState
- Get-O365AccountTransitionInfo
- Get-O365AdminGroups
- Get-O365AdministeredObjects
- Get-O365AllowedNetID
- Get-O365AuthorizedAdmins
- Get-O365AuthorizedByAdmin
- Get-O365BasicAuthPolicy
- Get-O365CalendarConfiguration
- Get-O365CalendarPermission
- Get-O365CalendarProcessing
- Get-O365Connections
- Get-O365ContextAllowedMethods
- Get-O365CurrentConnection
- Get-O365DomainAdminDoc
- Get-O365DomainAlternates
- Get-O365DomainChangelog
- Get-O365DomainLinkedAccounts
- Get-O365DomainResources
- Get-O365DomainSecurityLockedAccounts
- Get-O365DomainUsersInfo
- Get-O365Forward
- Get-O365GALStatus
- Get-O365Help
- Get-O365InboxRules
- Get-O365JunkFilters
- Get-O365LinkedAccounts
- Get-O365MailboxLogins
- Get-O365MailboxPermission
- Get-O365MobileDevices
- Get-O365PasswordChangeHistory
- Get-O365PrimaryAddress
- Get-O365Profile
- Get-O365ResourceFullAccess
- Get-O365ResourceInfo
- Get-O365UnlinkedAccounts
- Get-O365UserInfo
- Get-O365UsersByDomain
- Move-O365Alternate
- Remove-O365AllowedNetID
- Remove-O365Alternate
- Remove-O365AuthorizedAdmin
- Remove-O365Connection
- Remove-O365NetIDAdminAccess
- Remove-O365Resource
- Remove-O365ServiceAccount
- Repair-O365MailboxPermissions
- Request-O365NetIDAdminAccess
- Reset-O365Password
- Search-O365Objects
- Set-O365BasicAuthPolicy
- Set-O365CalendarConfiguration
- Set-O365CalendarProcessing
- Set-O365Connection
- Set-O365Forward
- Set-O365GALStatus
- Set-O365MailboxPermission
- Set-O365MailboxPolicy
- Set-O365MailPrimaryAddress
- Set-O365PrimaryAddress
- Set-O365ResourceFullAccess
- Set-O365StartupPreferences
- Update-O365APIFunctions
Grants access to a NetID to administer the account; also grants delegated mailbox access
Add-O365AllowedNetID [-addr] <Object> [-netid] <Object> [<CommonParameters>]
- addAllowedNetID
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 |
- failure: null
- success: 1
Adds an alternate address to an Office 365 account
Add-O365Alternate [-alternate] <Object> [[-domain] <Object>] [-msoluid] <Object> [-sponsornetid] <Object>
[<CommonParameters>]
- addAlternate
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 |
- failure: null
- success: 1
Grants full administrative control over a Service Account or Resource to a NetID
Add-O365AuthorizedAdmin [-admin] <Object> [-msoluid] <Object> [<CommonParameters>]
- addAuthorizedAdmin
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 |
- failure: null
- success: 1
Creates a new connection for the Office 365 API and sets it as the current connection.
Add-O365Connection [-id] <String> [-userName] <String> [-password] <String> [-domain] <String> [[-endpoint] <String>]
[[-save]] [<CommonParameters>]
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 |
- 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.
Adds a Manifest group to administer a NetID
Add-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]
- addNetIDAdminAccess
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 |
- failure: null
- success: 1
Creates an Office 365 Resource
Add-O365Resource [[-authorized\\_admin] <Object>] [[-description] <Object>] [-displayname] <Object> [[-domain] <Object>]
[-owner] <Object> [-resourcetype] <Object> [-sponsornetid] <Object> [-uid] <Object> [<CommonParameters>]
- addMsolResource
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 |
- failure: null
- success: 1
Creates an Office 365 Service Account in a domain that is not capable of hosting WiscMail Plus accounts
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>]
- addServiceAccount
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 |
- failure: null
- success: 1
Removes the automapping from Outlook for all users that currently have Full Mailbox permission
Disable-O365OutlookAutomapping [-msoluid] <Object> [<CommonParameters>]
- disableMsolOutlookAutomapping
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 |
- failure: null
- success: 1
Add or update profile attributes for a Service Account
Edit-O365Profile [[-company] <Object>] [[-department] <Object>] [[-facsimiletelephonenumber] <Object>] [[-homephone]
<Object>] [[-mobile] <Object>] [-msoluid] <Object> [[-physicaldeliveryofficename] <Object>] [[-postalcode] <Object>]
[[-telephonenumber] <Object>] [[-title] <Object>] [<CommonParameters>]
- editMsolProfile
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 |
- failure: null
- success: 1
Change the name or owner of an Office 365 Resource
Edit-O365Resource [-description] <Object> [-msoluid] <Object> [-name] <Object> [-owner] <Object> [<CommonParameters>]
- editMsolResource
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 |
- failure: null
- success: 1
Change the first or last name of an Office 365 Service Account
Edit-O365User [[-description] <Object>] [[-firstname] <Object>] [[-lastname] <Object>] [-msoluid] <Object>
[<CommonParameters>]
- editMsolUser
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 |
- failure: null
- success: 1
Gets the full list of email addresses applied to an account
Get-O365AccountAddresses [-msoluid] <Object> [<CommonParameters>]
- getAccountAddresses
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
msoluid | Unique ID of the account to get addresses on (e.g. foo\\_bar) | true | false |
- failure: null
- success: List of email addresses on an account
Returns a list of modifications made to an account
Get-O365AccountChangelog [[-change\\_types] <Object>] [-msoluid] <Object> [<CommonParameters>]
- getAccountChangelog
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 |
- failure: null
- success: List of changes to an account with a change\_type, change\_description, and timestamp
Get the system that an account is hosted on
Get-O365AccountSourcesystem [-account] <Object> [<CommonParameters>]
- get_account_sourcesystem
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 |
- failure: null (if unknown or not-existent)
- success: wiscmail|office365|external
Get information about a Service Account or WiscMail Plus account in a domain you administer
Get-O365AccountState [-account] <Object> [[-to\\_return] <Object>] [<CommonParameters>]
- get_account_state
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 |
- 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
Get information about when and how an account transitioned to Office 365, if available
Get-O365AccountTransitionInfo [-msoluid] <Object> [<CommonParameters>]
- getAccountTransitionInfo
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 |
- failure: null
- success: Transition timestamp and if the account was force transitioned
Gets a list of Manifest groups that have administrative access to a NetID
Get-O365AdminGroups [-netid] <Object> [<CommonParameters>]
- getAdminGroups
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
netid | The NetID for which to get the list of groups with administrative access | true | false |
- failure: null
- success: List of groups with access or pending access; pending groups will show as PENDING in the response
Provides a list of objects that the authenticated user can administer
Get-O365AdministeredObjects [<CommonParameters>]
- getAdministeredObjects
- failure: null
- success: A list of objects and basic details about the objects
Gets list of NetIDs that have access to administer the Service Account; these NetIDs also have full mailbox access
Get-O365AllowedNetID [-addr] <Object> [<CommonParameters>]
- getAllowedNetID
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 |
- failure: null
- success: A list of NetIDs that have administrative access; list may be empty if there are none
Gets list of NetIDs that have full administrative access over the Service Account or Resource
Get-O365AuthorizedAdmins [-msoluid] <Object> [<CommonParameters>]
- getAuthorizedAdmins
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 |
- failure: null
- success: List of NetIDs; empty list if none
Gets list of Service Accounts and/or Resources that the NetID has administrative access over
Get-O365AuthorizedByAdmin [[-acct\\_type] <Object>] [-msoluid] <Object> [<CommonParameters>]
- getAuthorizedByAdmin
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 |
- failure: null
- success: List of Service Accounts and/or Resources; empty list if none
Get the status of Office 365 basic authentication for a Service Account
Get-O365BasicAuthPolicy [[-detail] <Object>] [-msoluid] <Object> [<CommonParameters>]
- getMsolBasicAuthPolicy
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 |
- failure: null
- success: Returns the string 'Blocked' if Basic Authentication is disallowed, or the string 'Allowed' if Basic
- Authentication is allowed
Get a calendar configuration details
Get-O365CalendarConfiguration [[-include\\_metadata] <Object>] [[-request\\_params] <Object>] [-resource\\_email] <Object>
[<CommonParameters>]
- getCalendarConfiguration
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 |
- failure: null
- success: A set of keys and values with the configuration settings
Get the Calendar permissions on an Office 365 Service Account or Resource
Get-O365CalendarPermission [-msoluid] <Object> [<CommonParameters>]
- getMsolCalendarPermission
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 |
- 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
Details about how Exchange Online handles resource calendar events
Get-O365CalendarProcessing [[-include\\_metadata] <Object>] [[-request\\_params] <Object>] [-resource\\_email] <Object>
[<CommonParameters>]
- getCalendarProcessing
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 |
- 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)
Gets all the existing connections for the Office 365 API, both saved and in-memory.
Get-O365Connections [<CommonParameters>]
- An array of all existing connections is returned.
Gives a list of methods available based on the provided context
Get-O365ContextAllowedMethods [[-context] <Object>] [<CommonParameters>]
- getContextAllowedMethods
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 |
- failure: null
- success: A list of methods avaialble based on the context given
Gets the currently selected connection.
Get-O365CurrentConnection [<CommonParameters>]
- The details of the currently selection connection are returned.
Gets the documentation for the Domain Admin API, which is what you are viewing right now
Get-O365DomainAdminDoc [[-domain] <Object>] [<CommonParameters>]
- getDomainAdminDoc
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
domain | Domain name (e.g. bar.wisc.edu) | false | false | $Global:O365CurrentConnection.domain |
- failure: null
- success: JSON array with all Domain Admin API documentation
Gets a list of Office 365 alternate addresses in a domain
Get-O365DomainAlternates [[-all\\_addresses] <Object>] [[-domain] <Object>] [<CommonParameters>]
- getDomainAlternates
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 |
- 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
Returns a list of modifications made to a domain
Get-O365DomainChangelog [[-change\\_types] <Object>] [[-domain] <Object>] [<CommonParameters>]
- getDomainChangelog
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 |
- failure: null
- success: List of changes to a domain with a change\_type, change\_description, and timestamp
Returns a list of accounts that with linked NetIDs in the domain
Get-O365DomainLinkedAccounts [[-domain] <Object>] [[-netid] <Object>] [<CommonParameters>]
- getDomainLinkedAccounts
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 |
- failure: null
- success: List of objects that includes account identifier and linked NetID(s)
Get a list of Office 365 Resources in a domain
Get-O365DomainResources [[-domain] <Object>] [<CommonParameters>]
- getO365DomainResources
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 |
- 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)
Returns a list of Service Accounts that have been security locked
Get-O365DomainSecurityLockedAccounts [[-domain] <Object>] [<CommonParameters>]
- getDomainSecurityLockedAccounts
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 |
- failure: null
- success: List of unique IDs for locked accounts and timestamp indicating when the account was locked
Get a list of all accounts in a domain and some details about each
Get-O365DomainUsersInfo [[-domain] <Object>] [<CommonParameters>]
- getDomainUsersInfo
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 |
- failure: null
- success
- accounttype: user|role|alias|service
- description: example description
- givenname: Foo
- mailquota: 1000M
- netid: foo
- surname: Bar
Get the forwarding address (if any) on a Service Account
Get-O365Forward [-msoluid] <Object> [<CommonParameters>]
- getMsolForward
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 |
- failure: null
- success: forward if present or an empty string if none
Determine whether an account is visible in or hidden from the Office 365 Global Address List (GAL)
Get-O365GALStatus [-msoluid] <Object> [<CommonParameters>]
- getO365GALStatus
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 |
- failure: null
- success: visible|hidden
Launches the HTML help documentation for the module.
Get-O365Help [<CommonParameters>]
- WiscO365 Help.html or WiscO365 Initial Help.html
Get the inbox rules (if any) on a Service Account
Get-O365InboxRules [-msoluid] <Object> [<CommonParameters>]
- getMsolInboxRules
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 |
- 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
Get the junk mail filter settings for a Service Account
Get-O365JunkFilters [-msoluid] <Object> [<CommonParameters>]
- getMsolJunkFilters
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 |
- 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
Obtain a list of Service Accounts that are linked to a NetID
Get-O365LinkedAccounts [-netid] <Object> [<CommonParameters>]
- getLinkedAccounts
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 |
- failure: null
- success: List of Service Accounts; list will be empty if none
Get information about protocols and clients being used to access a mailbox.
Get-O365MailboxLogins [[-days] <Object>] [[-days\\_ago] <Object>] [-msoluid] <Object> [<CommonParameters>]
- getMsolMailboxLogins
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 |
- 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
Retrieve mailbox permissions on an Office 365 account
Get-O365MailboxPermission [-msoluid] <Object> [<CommonParameters>]
- getMsolMailboxPermission
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 |
- 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
Gets a list of mobile devices that have been granted access to connect with Exchange Active Sync to an O365 account
Get-O365MobileDevices [-msoluid] <Object> [<CommonParameters>]
- getMsolMobileDevices
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 |
- failure: null
- success: Returns an array of clients that have been connected to the account. Each returned client has some
- information about it.
Provides a list of occurrences when the password has changed for a Service Account
Get-O365PasswordChangeHistory [-msoluid] <Object> [<CommonParameters>]
- getPasswordChangeHistory
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 |
- failure: null
- success: A list of changes with a timestamp and user for each
Gets the primary address for an account from Office 365
Get-O365PrimaryAddress [-msoluid] <Object> [<CommonParameters>]
- getMsolPrimaryAddress
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 |
- failure: null
- success: Primary address for the given account
Get profile information (address, phone numbers, etc) about a Service Account
Get-O365Profile [-msoluid] <Object> [<CommonParameters>]
- getMsolProfile
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
msoluid | Unique ID of the Service Account | true | false |
- failure: null
- success: key/value pairs with profile information
Get a list of users that have full access to an Office 365 resource
Get-O365ResourceFullAccess [-msoluid] <Object> [<CommonParameters>]
- getMsolResourceFullAccess
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
msoluid | Unique ID of the resource (e.g. room\\_1234\\_foo) | true | false |
- 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)
Get basic details about an Office 365 Resource
Get-O365ResourceInfo [-msoluid] <Object> [<CommonParameters>]
- getMsolResourceInfo
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 |
- failure: null
- success: Resource name, email address, description, and type
Get a list of accounts in a domain that are not linked to any NetID
Get-O365UnlinkedAccounts [[-domain] <Object>] [<CommonParameters>]
- getUnlinkedAccounts
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 |
- 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)
(Deprecated) Get information about a specific account in a domain; intended for Prep Accounts
Get-O365UserInfo [-msoluid] <Object> [<CommonParameters>]
- getUserInfo
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 |
- failure: null
- success: Key->value pairs for directory information about account; note: Service Accounts will not include all
- alternate address values -- use getAccountAddresses
Gets a list of accounts in a domain
Get-O365UsersByDomain [[-domain] <Object>] [<CommonParameters>]
- getUsersByDomain
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 |
- failure: null
- success: List of accounts in the domain; return value is the left-hand side of the email address (e.g. foo)
Reassigns an existing alternate address on one account to another account
Move-O365Alternate [-alternate] <Object> [[-domain] <Object>] [-msoluid] <Object> [<CommonParameters>]
- reassignAlternate
- Reassign-O365Alternate
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 |
- failure: null
- success: 1
Revokes access from a NetID to administer the account; also removes delegated mailbox access
Remove-O365AllowedNetID [-addr] <Object> [-netid] <Object> [<CommonParameters>]
- removeAllowedNetID
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 |
- failure: null
- success: 1
Removes an alternate address from an Office 365 account
Remove-O365Alternate [-alternate] <Object> [[-domain] <Object>] [<CommonParameters>]
- removeAlternate
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 |
- failure: null
- success: 1
Revokes administrative control over a Service Account or Resource from a NetID
Remove-O365AuthorizedAdmin [-admin] <Object> [-msoluid] <Object> [<CommonParameters>]
- removeAuthorizedAdmin
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 |
- failure: null
- success: 1
Removes an existing Office 365 API connection from memory and disk storage.
Remove-O365Connection [-id] <String> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
id | The unique id for the connection. | true | false |
- 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)..
Revokes access from a Manifest group to administer a NetID
Remove-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]
- removeNetIDAdminAccess
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 |
- failure: null
- success: 1
Deletes an Office 365 Resource
Remove-O365Resource [-msoluid] <Object> [<CommonParameters>]
- deleteMsolResource
- Delete-O365Resource
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
msoluid | Unique ID of the Resource to delete (e.g. foo\\_room\\_bar) | true | false |
- failure: null
- success: 1
Deletes an Office 365 Service Account
Remove-O365ServiceAccount [-msoluid] <Object> [<CommonParameters>]
- Delete-O365ServiceAccount
- deleteServiceAccount
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
msoluid | Unique ID of the Service Account to delete (e.g. foo\\_bar) | true | false |
- failure: null
- success: 1
Compares permissions assigned locally and in Office 365 to check for inconsistencies and (optionally) repairs the inconsistencies
Repair-O365MailboxPermissions [-msoluid] <Object> [[-notify\\_email] <Object>] [-repair\\_action] <Object>
[<CommonParameters>]
- repairMsolMailboxPermissions
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 |
- 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.
Requests administrative access over a NetID for a Manifest group
Request-O365NetIDAdminAccess [-group] <Object> [-netid] <Object> [<CommonParameters>]
- requestNetIDAdminAccess
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 |
- failure: null
- success: 1
Change the password for an account
Reset-O365Password [-msoluid] <Object> [[-password] <Object>] [<CommonParameters>]
- resetPassword
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 |
- failure: null
- success: 1
Find a list of objects that the authenticated account can administer based on a search string
Search-O365Objects [-search\\_string] <Object> [<CommonParameters>]
- searchObjects
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 |
- failure: null
- success: A list of objects and basic details about the objects that match the search\_string
Set the status of Office 365 basic authentication for a Service Account
Set-O365BasicAuthPolicy [[-enable] <Object>] [-msoluid] <Object> [<CommonParameters>]
- setMsolBasicAuthPolicy
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 |
- failure: null
- success: 1
Change a calendar configuration details
Set-O365CalendarConfiguration [-param\\_name] <Object> [-param\\_value] <Object> [-resource\\_email] <Object>
[<CommonParameters>]
- setCalendarConfiguration
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 |
- failure: null
- success: 1
Change the calendar processing configuration for an Office 365 calendar
Set-O365CalendarProcessing [-param\\_name] <Object> [-param\\_value] <Object> [-resource\\_email] <Object>
[<CommonParameters>]
- setCalendarProcessing
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 |
- failure: null
- success: 1
Sets an existing Office 365 API connection as the current connection or clears the current connection.
Set-O365Connection [[-id] <String>] [<CommonParameters>]
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 |
- $Global:O365Session: Session information for the API.
- $Global:O365CurrentConnection: Connection information for the selected connection.
Set the forwarding address on a Service Account
Set-O365Forward [[-forward] <Object>] [-msoluid] <Object> [<CommonParameters>]
- setMsolForward
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 |
- failure: null
- success: 1
Changes the Office 365 Global Address List (GAL) searchable status for a Service Account
Set-O365GALStatus [-msoluid] <Object> [-status] <Object> [<CommonParameters>]
- setO365GALStatus
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 |
- failure: null
- success: 1
Add or remove mailbox permissions on an Office 365 account; Full, Send As, or Send on Behalf
Set-O365MailboxPermission [-delegate\\_account] <Object> [-permission] <Object> [-set\\_type] <Object> [-target\\_account]
<Object> [<CommonParameters>]
- setMsolMailboxPermission
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 |
- failure: null
- success: ID of the PowerShell job that was queued to change the permission
Update the mailbox policy for an Office 365 account; used to restrict forwarding for example
Set-O365MailboxPolicy [-msoluid] <Object> [-policy] <Object> [<CommonParameters>]
- setMsolMailboxPolicy
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 |
- failure: null
- success: 1
DEPRECATED; use setMsolPrimaryAddress - Set the primary email address on a Service Account
Set-O365MailPrimaryAddress [-msoluid] <Object> [-primary\\_address] <Object> [<CommonParameters>]
- setMailPrimaryAddress
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 |
- failure: null
- success: 1
Set the primary email address on a NetID or Service Account
Set-O365PrimaryAddress [-msoluid] <Object> [-primary\\_address] <Object> [<CommonParameters>]
- setMsolPrimaryAddress
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 |
- failure: null
- success: 1
Add or remove full access to an Office 365 resource.
Set-O365ResourceFullAccess [-delegate\\_account] <Object> [-resource\\_msoluid] <Object> [-set\\_type] <Object>
[<CommonParameters>]
- setMsolResourceFullAccess
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 |
- failure: null
- success: 1
Sets the preference to determine if the startup menu will be shown when importing the module.
Set-O365StartupPreferences [[-showStartupMenu]] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
showStartupMenu | Determines if the startup menu will be shown | false | false | False |
- Startup.txt
Updates the API functions and documentation in the module by getting the methods from the Domain Admin API Documentation.
Update-O365APIFunctions [-includeAlias] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
includeAlias | Includes the original API method name as an alias. | false | false | False |
- 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