4.5 KiB
external help file | Module Name | online version | schema |
---|---|---|---|
PWExpireNotification-help.xml | PWExpireNotification | 2.0.0 |
Send-PWExpiringMailMessage
SYNOPSIS
Used to send password expiration notification of ADDS Users
SYNTAX
Send-PWExpiringMailMessage -Resource <String> -SendEmailAccount <String> -Token <String>
[-TestAddress <String>] -ADAccount <PSObject> -Signature <String> -TextToAdd <String>
[-ExpireInDaysThreshold <Int32>] [-Logging] [-LogFile <String>] [<CommonParameters>]
DESCRIPTION
Used to send password expiration notification of ADDS Users
EXAMPLES
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.
PARAMETERS
-ADAccount
The ADUser account object
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExpireInDaysThreshold
The threshold for limiting at what time a user would be notified based on when their password expires.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Logging
Enable logging and output the logfile to the current working directory.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Resource
The graph resource that will be used
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: https://graph.microsoft.com, https://graph.microsoft.us, https://dod-graph.microsoft.us
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SendEmailAccount
The account that will be used to send the mail message. e.g. Shared O365 Mailbox
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Signature
The signature as a string that you would like within your email body.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TestAddress
Used for testing, all email messages will go to this address versus the end user.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Token
The token that will be used to send the message
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.