diff --git a/docs/en-US/PWExpireNotification-help.xml b/docs/en-US/PWExpireNotification-help.xml new file mode 100644 index 0000000..f459155 --- /dev/null +++ b/docs/en-US/PWExpireNotification-help.xml @@ -0,0 +1,930 @@ + + + + + Get-PWADDSExpiringPassword + Get + PWADDSExpiringPassword + + This cmdlet obtains all users within the domain that have a password expiring at some point + + + + This cmdlet obtains all users within the domain that have a password expiring at some point and omits those users that have an empty passwordlastset attribute + + + + Get-PWADDSExpiringPassword + + ExpireInDays + + Filters the output to return only users with passwords that expire less than or equal to the day + + Object + + Object + + + None + + + ADFilter + + Allows the ability to scope query to a specific location or user attribute + + ScriptBlock + + ScriptBlock + + + None + + + IncludeAll + + Enables the return of all users even if the the password never expires. + + + SwitchParameter + + + False + + + + + + ADFilter + + Allows the ability to scope query to a specific location or user attribute + + ScriptBlock + + ScriptBlock + + + None + + + ExpireInDays + + Filters the output to return only users with passwords that expire less than or equal to the day + + Object + + Object + + + None + + + IncludeAll + + Enables the return of all users even if the the password never expires. + + SwitchParameter + + SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-PWADDSExpiringPassword + + Gets all users and their password expiration except if the user is disabled, ,the passwword is already expired, or the password is set to never expire. + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-PWADDSExpiringPassword -IncludeAll + + Gets all users and their password expiration except if the password less set is null. + + + + + + + + + Get-PWApplicationToken + Get + PWApplicationToken + + Obtains an Application token using a client secret + + + + Intended to be used to obtain an token for an application that has Mail.Send permissions within Graph. + + + + Get-PWApplicationToken + + clientID + + Application ID of the AAD application + + String + + String + + + None + + + clientSecret + + Client secret of the application + + String + + String + + + None + + + Resource + + Used to identify the graph resource where the token will be used. + + + https://graph.microsoft.com + https://graph.microsoft.us + https://dod-graph.microsoft.us + + String + + String + + + None + + + tenantName + + Full TenantName such as mydomain.onmicrosoft.com + + String + + String + + + None + + + + + + Resource + + Used to identify the graph resource where the token will be used. + + String + + String + + + None + + + clientID + + Application ID of the AAD application + + String + + String + + + None + + + clientSecret + + Client secret of the application + + String + + String + + + None + + + tenantName + + Full TenantName such as mydomain.onmicrosoft.com + + String + + String + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> $param = @{ + clientID = $clientID + clientSecret = $sec + resource = $resource + tenantName = $tenantName +} +$token = Get-PWApplicationToken @param + + Providing the client ID, secret, graph resource, and tenantname, returns an OAuth token for the specified application + + + + + + + + Send-PWExpiringMailMessage + Send + PWExpiringMailMessage + + Used to send password expiration notification of ADDS Users + + + + Used to send password expiration notification of ADDS Users + + + + Send-PWExpiringMailMessage + + ADAccount + + The ADUser account object + + PSObject + + PSObject + + + None + + + ExpireInDaysThreshold + + The threshold for limiting at what time a user would be notified based on when their password expires. + + Int32 + + Int32 + + + None + + + LogFile + + If you want to log each run of this function this will enable logging and display what users were notified placing the logfile in the specified path. + + String + + String + + + None + + + Logging + + Enable logging and output the logfile to the current working directory. + + + SwitchParameter + + + False + + + Resource + + The graph resource that will be used + + + https://graph.microsoft.com + https://graph.microsoft.us + https://dod-graph.microsoft.us + + String + + String + + + None + + + SendEmailAccount + + The account that will be used to send the mail message. e.g. Shared O365 Mailbox + + String + + String + + + None + + + Signature + + The signature as a string that you would like within your email body. + + String + + String + + + None + + + TestAddress + + Used for testing, all email messages will go to this address versus the end user. + + String + + String + + + None + + + TextToAdd + + A free form string that will be within the email message body below the default line containing the number of days remaining before their password expires. + + String + + String + + + None + + + Token + + The token that will be used to send the message + + String + + String + + + None + + + + + + ADAccount + + The ADUser account object + + PSObject + + PSObject + + + None + + + ExpireInDaysThreshold + + The threshold for limiting at what time a user would be notified based on when their password expires. + + Int32 + + Int32 + + + None + + + LogFile + + If you want to log each run of this function this will enable logging and display what users were notified placing the logfile in the specified path. + + String + + String + + + None + + + Logging + + Enable logging and output the logfile to the current working directory. + + SwitchParameter + + SwitchParameter + + + False + + + Resource + + The graph resource that will be used + + String + + String + + + None + + + SendEmailAccount + + The account that will be used to send the mail message. e.g. Shared O365 Mailbox + + String + + String + + + None + + + Signature + + The signature as a string that you would like within your email body. + + String + + String + + + None + + + TestAddress + + Used for testing, all email messages will go to this address versus the end user. + + String + + String + + + None + + + TextToAdd + + A free form string that will be within the email message body below the default line containing the number of days remaining before their password expires. + + String + + String + + + None + + + Token + + The token that will be used to send the message + + String + + String + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\>$params = @{ + Resource = $resource + SendEmailAccount = $SendEmailAccount + Token = $token + TestAddress = $TestAddress + ADAccount = $user + ExpireInDaysThreshold = $ExpireInDaysThreshold + TextToAdd = $TextToAddToEmail + Signature = $Signature + Logging = $true + + } + Send-PWExpiringMailMessage @params -Verbose + + This command takes the input from the $params hashtable and then sends an email to the test address versus the configured user. This would be used in a test scenario. Prior to live implemenation. + + + + + + + + Set-PWEmailBody + Set + PWEmailBody + + This cmdlet is used to configure the email message body in JSON format for configuring the JSON payload to graph + + + + This cmdlet is used to configure the email message body in JSON format for configuring the JSON payload to graph + + + + Set-PWEmailBody + + Subject + + Subject line of the email + + String + + String + + + None + + + Importance + + Set the Importance of the email: High or Low + + String + + String + + + None + + + Message + + The message body + + String + + String + + + None + + + EmailAddress + + Email address to receive the email + + String + + String + + + None + + + + + + EmailAddress + + Email address to receive the email + + String + + String + + + None + + + Importance + + Set the Importance of the email: High or Low + + String + + String + + + None + + + Message + + The message body + + String + + String + + + None + + + Subject + + Subject line of the email + + String + + String + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Set-PWEmailBody -Subject "Your Password is Expiring in 10 Days" ` + -Importance "High" ` + -Message "Please change soon" ` + -EmailAddress "olduser@mycompany.com" + + Prepares the message section of the JSON payload to be submitted to Graph for sending the email message + + + + + + + + Set-PWEmailMessagePayload + Set + PWEmailMessagePayload + + Creates the full message paylod of to send to Graph API + + + + Creates the full message paylod of to send to Graph API + + + + Set-PWEmailMessagePayload + + ADAccount + + The account that is expiring + + PSObject + + PSObject + + + None + + + Signature + + Signature to be used within the email + + PSObject + + PSObject + + + None + + + TextToAdd + + Any additional text to add to the email body + + String + + String + + + None + + + + Set-PWEmailMessagePayload + + ADAccount + + The account that is expiring + + PSObject + + PSObject + + + None + + + Subject + + The email subject + + String + + String + + + None + + + + + + ADAccount + + The account that is expiring + + PSObject + + PSObject + + + None + + + Signature + + Signature to be used within the email + + PSObject + + PSObject + + + None + + + Subject + + The email subject + + String + + String + + + None + + + TextToAdd + + Any additional text to add to the email body + + String + + String + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Set-PWEmailMessagePayload -TextToAdd $TextToAdd -ADAccount $ADAccount -Signature $Signature + + Prepares the json payload for graph + + + + + + \ No newline at end of file