New-SCSMAnnouncement

Creates a new announcement in Service Manager.

Syntax

New-SCSMAnnouncement
   [-Body <String>]
   [-DisplayName <String>]
   [-ExpirationDate] <DateTime>
   [-Priority <String>]
   [-Title] <String>
   [-PassThru]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-SCSMAnnouncement cmdlet creates an announcement in Service Manager.

Examples

Example 1: Create an announcement

PS C:\>$Expire = [DateTime]::Now.AddMonths(3)
PS C:\> New-SCSMAnnouncement -Title "A new announcement" -ExpirationDate $Expire -Body "Hello there"

The first command assigns a DateTime object that represents three months in the future to the $Expire variable.

The second command creates a simple announcement that includes a title and text. The command specifies the expiration date stored in $Expire.

Parameters

-Body

Specifies the body of the announcement. This string can be plain text or rich text.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:System.String[]
Position:Named
Default value:Localhost
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of the announcement.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpirationDate

Specifies the expiration date and time of the announcement.

Type:System.Nullable`1[System.DateTime]
Position:1
Default value:1/1/3000
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Indicates that this cmdlet returns the announcement that it creates. You can pass this object to other cmdlets.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Priority

Specifies the priority of the announcement.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

Specifies an object that represents the session to a Service Manager management server.

Type:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Title

Specifies the title of the announcement. This is a string that is typically short.

Type:System.String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.