Mail Servers
  • 16 Mar 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Mail Servers

  • Dark
    Light
  • PDF

Article summary

Get-LiquitMailServer

Synopsis

This command displays a list of all mail servers defined within the Liquit zone.

Syntax

 Get-LiquitMailServer 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-ID] <guid[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-EntityRef] <EntityRef[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

Examples

Example 1: Get-LiquitMailServer

 Get-LiquitMailServer 

This command displays all mail servers defined in the Liquit Workspace.

Example 2: Get-LiquitMailServer

 Get-LiquitMailServer -id 00000000-0000-0000-0000-000000000000

This command selects a specific mail server.

New-LiquitMailServer

Synopsis

This command creates a new mail server.

Syntax

 New-LiquitMailServer 
	[-Name] <string> 
	-From <string> 
	-Server <string>
	[-Secure <bool>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>] 
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf]
	[-Confirm]  
	[<CommonParameters>]

Example

     New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"

This command creates a new mail server named "PowerShell Mail Server".

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the mail server.Yes
From<string>The sender address.Yes
Server<string>The server address.Yes
Secure<bool>Whether or not the connection is secure.NoFalse
Port<int>The port that should be used.No25
Priority<int>The priority the mail server takes.No0
Credential<pscredential>The credential used to authenticate to the mail server.No
Description<string>The description of the mail server.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Set-LiquitMailServer

Synopsis

This command lets you edit the properties of a mail server.

Syntax

 Set-LiquitMailServer 
	[-MailServer] <MailServer[]> 
	[-Name <string>] 
	[-From <string>] 
	[-Secure <bool>] 
	[-Server <string>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>]
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Set-LiquitMailServer -Name "Updated PowerShell Mail Server" 

This command updates an existing mail server and renames it "Updated PowerShell Mail Server".

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the mail server.No
From<string>The sender address.No
Server<string>The server address.No
Secure<bool>Whether or not the connection is secure.NoFalse
Port<int>The port that should be used.No25
Priority<int>The priority the mail server takes.No0
Credential<pscredential>The credential used to authenticate to the mail server.No
Description<string>The description of the mail server.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Remove-LiquitMailServer

Synopsis

This command removes a mail server from the Liquit Workspace.

Syntax

 Remove-LiquitMailServer
	[-MailServer] <MailServer[]> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Remove-LiquitMailServer -MailServer $mailServer 

This command removes the selected mail server from the Liquit Workspace.

Parameters

NameValueDescriptionRequiredDefault value
MailServer<MailServer[]>The mail server you wish to remove.Yes
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Was this article helpful?