Wednesday, 4 July 2018

Powershell script to display message box to user giving them the option to restart now or later

 

 

I required a script that would run automatically for a user from a RunOnce key.  This powershell script gives the user a message box asking if they would like to restart now or later.  If they choose "yes" it will reboot now, if they choose "No" or "Cancel" it will not restart but will give the user a message box telling them that they need to restart manually ASAP.

 

 

Add-Type -AssemblyName PresentationCore,PresentationFramework

$ButtonType = [System.Windows.MessageBoxButton]::YesNoCancel

$MessageIcon = [System.Windows.MessageBoxImage]::Exclamation

$MessageBody = "In order to complete setup, Windows needs to restart.  Click Yes to restart now or No if you plan to restart later."

$MessageTitle = "Cloudwyse Set-up Completion"

$ButtonType2 = [System.Windows.MessageBoxButton]::OK

$MessageIcon2 = [System.Windows.MessageBoxImage]::Error

$MessageBody2 = "The system will not operate correctly until a restart is completed.  Remember to restart ASAP!"

$MessageTitle2 = "WARNING!!"

$Choice = [System.Windows.MessageBox]::Show($MessageBody,$MessageTitle,$ButtonType,$MessageIcon)

 

If ($Choice -eq "No" -OR $Choice -eq "Cancel") {

  [System.Windows.MessageBox]::Show($MessageBody2,$MessageTitle2,$ButtonType2,$MessageIcon2)

  }  Else {

  Restart-Computer

} 

 

 

Hyper-V host running core - check RAM from remote server with Powershell

 

 

Here's a little script I created that was useful to check the amount of physical RAM installed on a Hyper-V server running core.  It reports the amount of physical RAM in the host as well as the amount of RAM which is actually visible and addressable to the server.  It also reports the RAM which is currently assigned the Hyper-V host OS..

 

 

Add-Type -AssemblyName PresentationFramework

$Server = "ADVYOHV01"

$PRAM = (Get-WMIObject -class Win32_PhysicalMemory -ComputerName $Server |`

Measure-Object -Property capacity -Sum | % {[Math]::Round(($_.sum / 1GB),2)})

$IRAM = Get-WmiObject -Class Win32_ComputerSystem -ComputerName $Server

$IRAM = [Math]::Round(($IRAM.TotalPhysicalMemory/ 1GB))

$CheckHost = Get-Ciminstance Win32_OperatingSystem

$PCTFREE = [math]::Round(($CheckHost.FreePhysicalMemory/$CheckHost.TotalVisibleMemorySize)*100,0)

$GBFREE = [math]::Round($CheckHost.FreePhysicalMemory/1mb,2)

$TOTALGB = [int]($CheckHost.TotalVisibleMemorySize/1mb)

[System.Windows.MessageBox]::Show("Hardware`:

`n$PRAM`GB Physical Memory `($IRAM`GB addressable`)

`n

`nCurrent OS Usage`:

`n$GBFREE`GB free out of $TOTALGB`GB total `($PCTFREE`% used`)","Memory details for server `"$Server`"")

 

 

Friday, 29 June 2018

Find number of cores on each processor for Microsoft Server 2016 Licensing

 

To calculate the cost of licensing for Server 2016, it's necessary to know how many cores each CPU of your server is running.  This WMI query is useful in identifying that. 

 

$property = "systemname", "deviceid", "name", "maxclockspeed","addressWidth", "numberOfCores", "NumberOfLogicalProcessors"

Get-WmiObject -class win32_processor -Property  $property | Select-Object -Property $property


 

 

Thursday, 28 June 2018

How to install and configure Hyper-V Host (core) for remote administration

 

 

It's possible to configure a Hyper-V host running core to be fully managed remotely.  I have read various suggestions on the web saying it’s better and more secure to leave the Hyper-V host in a workgroup, but the effort required when doing that just doesn’t make it worth it in my opinion.

And we actually want 1st and 2nd line technicians to be able to do as much troubleshooting as possible before escalating, rather than adding complexity.

 

OK if you haven’t already run the following on the core server do it now:

 

 

Enable-PSRemoting

 

 

If you don’t know the hostname, run the command now.

 

 

hostname

 

 

All being well, that should be the last time we need to run commands locally on the core server.  The machine you use to administer the core server must have the required Remote Server Administration Tools installed and, for ease of access, be a member of the domain.

 

So let’s connect to the host (obviously switch “oobehostname” for whatever the hostname of your machine is).

 

 

Enter-PSSession <oobehostname>

 

 

Next, rename it specifying your credentials

 

 

Rename-Computer -NewName "contosohv012" -DomainCredential contoso\admdel.griffith -Restart

 

 

Once the server has restarted, reconnect.  Then you can either do

 

 

Enter-PSSession contosohv012

Install-WindowsFeature -Name Hyper-V -Restart

 

 

Or to execute the command remotely

 

 

Install-WindowsFeature -Name Hyper-V -ComputerName “contosohv012” -Restart

 

 

If you aren’t sure whether Hyper-V is installed or not, you can run

 

 

Get-WindowsFeature -Name Hyper-V -ComputerName “contosohv012”

 

 

Next comes the firewall settings.  This Microsoft document explains that to enable remote management of a 2016 core server you should run:

 

 

Enable-NetFirewallRule -DisplayGroup "Remote Administration"

 

 

But this group was removed starting with Windows Server 2012.  So instead I ran:

 

 

Get-NetFirewallRule | select-object -expand DisplayGroup

 

 

to find the names of the services I needed.

 

To allow access for each follow these steps:

 

Windows Firewall with Advanced Security (I preferred just setting this on the Domain profile so I edited the rule first)

 

 

Set-NetFirewallRule -DisplayGroup "Windows Firewall Remote Management" -Profile Domain

Enable-NetFirewallRule -DisplayGroup "Windows Firewall Remote Management"

 

 

Services

 

 

Enable-NetFirewallRule -DisplayGroup "Remote Service Management"

 

 

Event Viewer

 

 

Enable-NetFirewallRule -DisplayGroup "Remote Event Log Management"

 

 

Shared Folders

 

 

Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing"

 

 

Performance Logs and Alerts

There are rules on each of the different profiles, so just the regular -DisplayGroup won’t cut the mustard here

 

 

Get-NetFirewallRule | Where {$_.DisplayGroup -eq "Performance Logs and Alerts" -and $_.Profile -eq "Domain"} | Enable-NetFirewallRule

 

 

Disk Management

Disk Management is also a little more complicated.  First run this on the remote machine:

 

 

Enable-NetFirewallRule -DisplayGroup "Remote Volume Management"

 

 

Then run the same command on the local machine.  Next, we need to start the virtual disk service.

 

 

Set-Service -Name vds -StartupType Automatic

Set-Service -Name vds -Status Running -PassThru

 

 

Now you should be able to connect computer management, and all other required mmc consoles by right clicking and choosing “Connect to another computer”.

 

 

 

Wednesday, 27 June 2018

Configure IPv4 IP Address, DNS servers and DNS Suffix from within Powershell

I recently used this on a Hyper-V build.  It should provide enough network connectivity to add your server to the Active Directory domain.

Find connected NICs and interface names

 

Get-NetAdapter

 

 

Configure IP address

 

New-NetIPAddress -InterfaceAlias "NIC1" -IPAddress 10.20.0.141 -AddressFamily IPv4 -PrefixLength 24 -DefaultGateway 10.20.0.1

 

 

Configure DNS Servers

 

 

Set-DnsClientServerAddress -InterfaceAlias "NIC1" -ServerAddresses 10.20.0.133

 

 

Configure the suffix search list

 

 

Set-DnsClientGlobalSetting -SuffixSearchList corp.contoso.com

 

 

 

Monday, 17 July 2017

.

Here is a list of all the connector configs that are currently in place from onsite-O365… sorry for the mammoth post

Receive connectors

 

Get-ReceiveConnector -Server contosoxch01.contoso.com

 

 

Identity                                        Bindings                  Enabled

--------                                        --------                  -------

CONTOSOXCH01\Default CONTOSOXCH01                 {0.0.0.0:2525, [::]:2525} True

CONTOSOXCH01\Client Proxy CONTOSOXCH01            {[::]:465, 0.0.0.0:465}   True

CONTOSOXCH01\Default Frontend CONTOSOXCH01        {[::]:25, 0.0.0.0:25}     True

CONTOSOXCH01\Outbound Proxy Frontend CONTOSOXCH01 {[::]:717, 0.0.0.0:717}   True

CONTOSOXCH01\Client Frontend CONTOSOXCH01         {[::]:587, 0.0.0.0:587}   True

CONTOSOXCH01\Anonymous Email Relay                {0.0.0.0:25}              True 

 

 Anonymous Email Relay connector

 

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Anonymous Email Relay" | Format-List

 

 

RunspaceId                                : 6dcbfe67-9b15-5ee6-92ed-d7ea0c2dd5af

AuthMechanism                             : Tls, ExternalAuthoritative

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {0.0.0.0:25}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : False

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : smtp.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        :

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : Unlimited

MessageRateSource                         : IPAddress

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : 20

MaxInboundConnectionPercentagePerSource   : 2

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 200

PermissionGroups                          : AnonymousUsers, ExchangeServers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : None

RemoteIPRanges                            : {172.24.0.0/24, 10.0.2.0/24, 192.168.26.0/23, 192.168.14.0/23...}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : False

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {}

Server                                    : CONTOSOXCH01

TransportRole                             : FrontendTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : Enabled

TarpitInterval                            : 00:00:05

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Anonymous Email Relay

DistinguishedName                         : CN=Anonymous Email Relay,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Anonymous Email Relay

Guid                                      : 33e51cb0-1e9c-5ee6-92ed-7fcba280977e

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 29/03/2018 15:01:16

WhenCreated                               : 29/03/2018 14:58:35

WhenChangedUTC                            : 29/03/2018 14:01:16

WhenCreatedUTC                            : 29/03/2018 13:58:35

OrganizationId                            :

Id                                        : CONTOSOXCH01\Anonymous Email Relay

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

Client frontend connector

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Client Frontend CONTOSOXCH01" | Format-List

 

 

RunspaceId                                : 6dcbfe67-9b15-6ed8-1aa2-d7ea0c2dd5af

AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {[::]:587, 0.0.0.0:587}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : False

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : CONTOSOXCH01.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        :

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : 5

MessageRateSource                         : User

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : 20

MaxInboundConnectionPercentagePerSource   : 2

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 200

PermissionGroups                          : ExchangeUsers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : None

RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : True

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {}

Server                                    : CONTOSOXCH01

TransportRole                             : FrontendTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : Enabled

TarpitInterval                            : 00:00:05

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Client Frontend CONTOSOXCH01

DistinguishedName                         : CN=Client Frontend CONTOSOXCH01,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Client Frontend CONTOSOXCH01

Guid                                      : 890fcc0d-dbdf-6ed8-1aa2-dabde9adf027

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 29/01/2018 11:35:45

WhenCreated                               : 29/01/2018 11:35:30

WhenChangedUTC                            : 29/01/2018 11:35:45

WhenCreatedUTC                            : 29/01/2018 11:35:30

OrganizationId                            :

Id                                        : CONTOSOXCH01\Client Frontend CONTOSOXCH01

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

 

Client proxy connector

 

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Client Proxy CONTOSOXCH01" | Format-List

 

 

RunspaceId                                : 6dcbfe67-9b15-2de5-8aa6-d7ea0c2dd5af

AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {[::]:465, 0.0.0.0:465}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : False

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : CONTOSOXCH01.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        :

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : 5

MessageRateSource                         : User

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : 20

MaxInboundConnectionPercentagePerSource   : 2

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 200

PermissionGroups                          : ExchangeUsers, ExchangeServers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : None

RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : True

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {}

Server                                    : CONTOSOXCH01

TransportRole                             : HubTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : Enabled

TarpitInterval                            : 00:00:05

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Client Proxy CONTOSOXCH01

DistinguishedName                         : CN=Client Proxy CONTOSOXCH01,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Client Proxy CONTOSOXCH01

Guid                                      : 85aae35d-570a-2de5-8aa6-bd7f8fec1c81

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 29/01/2018 11:25:49

WhenCreated                               : 29/01/2018 11:25:41

WhenChangedUTC                            : 29/01/2018 11:25:49

WhenCreatedUTC                            : 29/01/2018 11:25:41

OrganizationId                            :

Id                                        : CONTOSOXCH01\Client Proxy CONTOSOXCH01

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

 

Default frontend connector

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Default Frontend CONTOSOXCH01" | Format-List

 

 

RunspaceId                                : 6dcbfe67-9b15-5ed9-1b03-d7ea0c2dd5af

AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {[::]:25, 0.0.0.0:25}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : True

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : CONTOSOXCH01.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        : <I>CN=DigiCert SHA2 Secure Server CA, O=DigiCert Inc,

                                            C=US<S>CN=*.contoso.com, OU=IT, O=Contoso Corp,

                                            L=New York, S=New York, C=US

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : Unlimited

MessageRateSource                         : IPAddress

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : 20

MaxInboundConnectionPercentagePerSource   : 2

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 200

PermissionGroups                          : AnonymousUsers, ExchangeServers, ExchangeLegacyServers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : Verbose

RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : False

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {mail.protection.outlook.com:AcceptCloudServicesMail}

Server                                    : CONTOSOXCH01

TransportRole                             : FrontendTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : Enabled

TarpitInterval                            : 00:00:05

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Default Frontend CONTOSOXCH01

DistinguishedName                         : CN=Default Frontend CONTOSOXCH01,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Default Frontend CONTOSOXCH01

Guid                                      : f24a1f12-6ea7-5ed9-1b03-e5eec361d482

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 10/04/2018 12:02:20

WhenCreated                               : 29/01/2018 11:35:30

WhenChangedUTC                            : 10/04/2018 11:02:20

WhenCreatedUTC                            : 29/01/2018 11:35:30

OrganizationId                            :

Id                                        : CONTOSOXCH01\Default Frontend CONTOSOXCH01

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

 

 

Default receive connector

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Default CONTOSOXCH01" | Format-List

 

RunspaceId                                : 6dcbfe67-9b15-5537-8008-d7ea0c2dd5af

AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {0.0.0.0:2525, [::]:2525}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : False

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : CONTOSOXCH01.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        :

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : Unlimited

MessageRateSource                         : IPAddress

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : Unlimited

MaxInboundConnectionPercentagePerSource   : 100

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 5000

PermissionGroups                          : ExchangeUsers, ExchangeServers, ExchangeLegacyServers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : None

RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : False

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {}

Server                                    : CONTOSOXCH01

TransportRole                             : HubTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : EnabledWithoutValue

TarpitInterval                            : 00:00:05

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Default CONTOSOXCH01

DistinguishedName                         : CN=Default CONTOSOXCH01,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Default CONTOSOXCH01

Guid                                      : ee22ce2c-fd09-5537-8008-1f20d8690123

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 29/01/2018 11:35:45

WhenCreated                               : 29/01/2018 11:25:41

WhenChangedUTC                            : 29/01/2018 11:35:45

WhenCreatedUTC                            : 29/01/2018 11:25:41

OrganizationId                            :

Id                                        : CONTOSOXCH01\Default CONTOSOXCH01

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

 

Outbound proxy connector

 

Get-ReceiveConnector -Identity "CONTOSOXCH01\Outbound Proxy Frontend CONTOSOXCH01" | Format-List

 

 

RunspaceId                                : 6dcbfe67-9b15-5537-8008-d7ea0c2dd5af

AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer

Banner                                    :

BinaryMimeEnabled                         : True

Bindings                                  : {[::]:717, 0.0.0.0:717}

ChunkingEnabled                           : True

DefaultDomain                             :

DeliveryStatusNotificationEnabled         : True

EightBitMimeEnabled                       : True

SmtpUtf8Enabled                           : True

BareLinefeedRejectionEnabled              : False

DomainSecureEnabled                       : True

EnhancedStatusCodesEnabled                : True

LongAddressesEnabled                      : False

OrarEnabled                               : False

SuppressXAnonymousTls                     : False

ProxyEnabled                              : False

AdvertiseClientSettings                   : False

Fqdn                                      : CONTOSOXCH01.contoso.com

ServiceDiscoveryFqdn                      :

TlsCertificateName                        :

Comment                                   :

Enabled                                   : True

ConnectionTimeout                         : 00:10:00

ConnectionInactivityTimeout               : 00:05:00

MessageRateLimit                          : Unlimited

MessageRateSource                         : IPAddress

MaxInboundConnection                      : 5000

MaxInboundConnectionPerSource             : 20

MaxInboundConnectionPercentagePerSource   : 2

MaxHeaderSize                             : 256 KB (262,144 bytes)

MaxHopCount                               : 60

MaxLocalHopCount                          : 12

MaxLogonFailures                          : 3

MaxMessageSize                            : 36 MB (37,748,736 bytes)

MaxProtocolErrors                         : 5

MaxRecipientsPerMessage                   : 200

PermissionGroups                          : ExchangeServers

PipeliningEnabled                         : True

ProtocolLoggingLevel                      : Verbose

RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}

RequireEHLODomain                         : False

RequireTLS                                : False

EnableAuthGSSAPI                          : False

ExtendedProtectionPolicy                  : None

LiveCredentialEnabled                     : False

TlsDomainCapabilities                     : {}

Server                                    : CONTOSOXCH01

TransportRole                             : FrontendTransport

RejectReservedTopLevelRecipientDomains    : False

RejectReservedSecondLevelRecipientDomains : False

RejectSingleLabelRecipientDomains         : False

AcceptConsumerMail                        : False

SizeEnabled                               : Enabled

TarpitInterval                            : 00:00:00

AuthTarpitInterval                        : 00:00:05

MaxAcknowledgementDelay                   : 00:00:30

AdminDisplayName                          :

ExchangeVersion                           : 0.1 (8.0.535.0)

Name                                      : Outbound Proxy Frontend CONTOSOXCH01

DistinguishedName                         : CN=Outbound Proxy Frontend CONTOSOXCH01,CN=SMTP Receive

                                            Connectors,CN=Protocols,CN=CONTOSOXCH01,CN=Servers,CN=Exchange

                                            Administrative Group (FYDIPYHF23SPDDT),CN=Administrative

                                            Groups,CN=CONTOSO,CN=Microsoft

                                            Exchange,CN=Services,CN=Configuration,DC=CONTOSO,DC=COM

Identity                                  : CONTOSOXCH01\Outbound Proxy Frontend CONTOSOXCH01

Guid                                      : 89949ace-884b-5537-8008-ebc8a510b1e6

ObjectCategory                            : contoso.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector

ObjectClass                               : {top, msExchSmtpReceiveConnector}

WhenChanged                               : 29/01/2018 11:35:45

WhenCreated                               : 29/01/2018 11:35:30

WhenChangedUTC                            : 29/01/2018 11:35:45

WhenCreatedUTC                            : 29/01/2018 11:35:30

OrganizationId                            :

Id                                        : CONTOSOXCH01\Outbound Proxy Frontend CONTOSOXCH01

OriginatingServer                         : CONTOSODC01.contoso.com

IsValid                                   : True

ObjectState                               : Unchanged

 

 

Send connectors

 

Get-SendConnector

 

Identity                           AddressSpaces                                                          Enabled

--------                           -------------                                                          -------

Outgoing Email Send Connector      {SMTP:*;10}                                                            True

Sharepoint Forwarder 2010          {SMTP:*.sharepoint.contoso.com;1, SMTP:*.sp2010.contoso.com;1}         True

Sharepoint2010                     {SMTP:contososp2010wfe.contoso.com;1}                                  True

Outbound to Office 365             {smtp:contoso.mail.onmicrosoft.com;1}                                  True

Send outbound email via Office 365 {smtp:*;9}                                                             True

 

 

Outbound O365 connector

 

Get-SendConnector -Identity "Outbound to Office 365" | Format-List

 

 

AddressSpaces                : {smtp:contoso.mail.onmicrosoft.com;1}

AuthenticationCredential     :

CloudServicesMailEnabled     : True

Comment                      :

ConnectedDomains             : {}

ConnectionInactivityTimeOut  : 00:10:00

ConnectorType                : Default

DNSRoutingEnabled            : True

DomainSecureEnabled          : False

Enabled                      : True

ErrorPolicies                : Default

ForceHELO                    : False

Fqdn                         : mail.contoso.com

FrontendProxyEnabled         : False

HomeMTA                      : Microsoft MTA

HomeMtaServerId              : CONTOSOXCH01

Identity                     : Outbound to Office 365

IgnoreSTARTTLS               : False

IsScopedConnector            : False

IsSmtpConnector              : True

MaxMessageSize               : 50 MB (52,428,800 bytes)

Name                         : Outbound to Office 365

Port                         : 25

ProtocolLoggingLevel         : None

Region                       : NotSpecified

RequireOorg                  : False

RequireTLS                   : True

SmartHostAuthMechanism       : None

SmartHosts                   : {}

SmartHostsString             :

SmtpMaxMessagesPerConnection : 20

SourceIPAddress              : 0.0.0.0

SourceRoutingGroup           : Exchange Routing Group (DWBGPYFD01QNBDR)

SourceTransportServers       : {CONTOSOXCH01}

TlsAuthLevel                 : DomainValidation

TlsCertificateName           : <I>CN=DigiCert SHA2 Secure Server CA, O=DigiCert Inc, C=US<S>CN=*.contoso.com,

                               OU=IT, O=Contoso Corp, L=New York, S=New York, C=US

TlsDomain                    : mail.protection.outlook.com

UseExternalDNSServersEnabled : False

 

 

Outgoing email connector

 

Get-SendConnector -Identity "Outgoing Email Send Connector" | Format-List

 

 

AddressSpaces                : {SMTP:*;10}

AuthenticationCredential     :

CloudServicesMailEnabled     : False

Comment                      :

ConnectedDomains             : {}

ConnectionInactivityTimeOut  : 00:10:00

ConnectorType                : Default

DNSRoutingEnabled            : True

DomainSecureEnabled          : False

Enabled                      : True

ErrorPolicies                : Default

ForceHELO                    : False

Fqdn                         :

FrontendProxyEnabled         : False

HomeMTA                      : Microsoft MTA

HomeMtaServerId              : CONTOSOXCH01

Identity                     : Outgoing Email Send Connector

IgnoreSTARTTLS               : False

IsScopedConnector            : False

IsSmtpConnector              : True

MaxMessageSize               : 53.71 MB (56,320,000 bytes)

Name                         : Outgoing Email Send Connector

Port                         : 25

ProtocolLoggingLevel         : None

Region                       : NotSpecified

RequireOorg                  : False

RequireTLS                   : False

SmartHostAuthMechanism       : None

SmartHosts                   : {}

SmartHostsString             :

SmtpMaxMessagesPerConnection : 20

SourceIPAddress              : 0.0.0.0

SourceRoutingGroup           : Exchange Routing Group (DWBGPYFD01QNBDR)

SourceTransportServers       : {CONTOSOXCH01}

TlsAuthLevel                 :

TlsCertificateName           :

TlsDomain                    :

UseExternalDNSServersEnabled : False

 

 

 

Additional O365 connector?

 

Get-SendConnector -Identity "Send outbound email via Office 365" | Format-List

 

 

AddressSpaces                : {smtp:*;9}

AuthenticationCredential     :

CloudServicesMailEnabled     : False

Comment                      :

ConnectedDomains             : {}

ConnectionInactivityTimeOut  : 00:10:00

ConnectorType                : Default

DNSRoutingEnabled            : False

DomainSecureEnabled          : False

Enabled                      : True

ErrorPolicies                : Default

ForceHELO                    : False

Fqdn                         : mail.contoso.com

FrontendProxyEnabled         : False

HomeMTA                      : Microsoft MTA

HomeMtaServerId              : CONTOSOXCH01

Identity                     : Send outbound email via Office 365

IgnoreSTARTTLS               : False

IsScopedConnector            : False

IsSmtpConnector              : True

MaxMessageSize               : 50 MB (52,428,800 bytes)

Name                         : Send outbound email via Office 365

Port                         : 25

ProtocolLoggingLevel         : None

Region                       : NotSpecified

RequireOorg                  : False

RequireTLS                   : True

SmartHostAuthMechanism       : None

SmartHosts                   : {contoso.mail.protection.outlook.com}

SmartHostsString             : contoso.mail.protection.outlook.com

SmtpMaxMessagesPerConnection : 20

SourceIPAddress              : 0.0.0.0

SourceRoutingGroup           : Exchange Routing Group (DWBGPYFD01QNBDR)

SourceTransportServers       : {CONTOSOXCH01}

TlsAuthLevel                 : CertificateValidation

TlsCertificateName           :

TlsDomain                    :

UseExternalDNSServersEnabled : False

 

 

 

Sharepoint connector

 

Get-SendConnector -Identity "Sharepoint Forwarder 2010" | Format-List

 

 

AddressSpaces                : {SMTP:*.sharepoint.contoso.com;1, SMTP:*.sp2010.contoso.com;1}

AuthenticationCredential     :

CloudServicesMailEnabled     : False

Comment                      :

ConnectedDomains             : {}

ConnectionInactivityTimeOut  : 00:10:00

ConnectorType                : Default

DNSRoutingEnabled            : False

DomainSecureEnabled          : False

Enabled                      : True

ErrorPolicies                : Default

ForceHELO                    : False

Fqdn                         :

FrontendProxyEnabled         : False

HomeMTA                      : Microsoft MTA

HomeMtaServerId              : CONTOSOXCH01

Identity                     : Sharepoint Forwarder 2010

IgnoreSTARTTLS               : False

IsScopedConnector            : True

IsSmtpConnector              : True

MaxMessageSize               : 10 MB (10,485,760 bytes)

Name                         : Sharepoint Forwarder 2010

Port                         : 25

ProtocolLoggingLevel         : None

Region                       : NotSpecified

RequireOorg                  : False

RequireTLS                   : False

SmartHostAuthMechanism       : None

SmartHosts                   : {contososp2010wfe.contoso.com}

SmartHostsString             : contososp2010wfe.contoso.com

SmtpMaxMessagesPerConnection : 20

SourceIPAddress              : 0.0.0.0

SourceRoutingGroup           : Exchange Routing Group (DWBGPYFD01QNBDR)

SourceTransportServers       : {CONTOSOXCH01}

TlsAuthLevel                 :

TlsCertificateName           :

TlsDomain                    :

UseExternalDNSServersEnabled : False

 

 

 

Sharepoint 2010 connector

 

Get-SendConnector -Identity "Sharepoint2010" | Format-List

 

 

AddressSpaces                : {SMTP:contososp2010wfe.contoso.com;1}

AuthenticationCredential     :

CloudServicesMailEnabled     : False

Comment                      :

ConnectedDomains             : {}

ConnectionInactivityTimeOut  : 00:10:00

ConnectorType                : Default

DNSRoutingEnabled            : False

DomainSecureEnabled          : False

Enabled                      : True

ErrorPolicies                : Default

ForceHELO                    : False

Fqdn                         :

FrontendProxyEnabled         : False

HomeMTA                      : Microsoft MTA

HomeMtaServerId              : CONTOSOXCH01

Identity                     : Sharepoint2010

IgnoreSTARTTLS               : False

IsScopedConnector            : False

IsSmtpConnector              : True

MaxMessageSize               : Unlimited

Name                         : Sharepoint2010

Port                         : 25

ProtocolLoggingLevel         : None

Region                       : NotSpecified

RequireOorg                  : False

RequireTLS                   : False

SmartHostAuthMechanism       : None

SmartHosts                   : {contoso.com.outbound.snwlhostgen.com}

SmartHostsString             : contoso.com.outbound.snwlhostgen.com

SmtpMaxMessagesPerConnection : 20

SourceIPAddress              : 0.0.0.0

SourceRoutingGroup           : Exchange Routing Group (DWBGPYFD01QNBDR)

SourceTransportServers       : {CONTOSOXCH01}

TlsAuthLevel                 :

TlsCertificateName           :

TlsDomain                    :

UseExternalDNSServersEnabled : False