Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar

supermarsx

  • Portugal
  • 02:48 (UTC)
View GitHub Profile
@supermarsx
supermarsx / Get-MoveRequestStatisticsAll.ps1
Last active July 18, 2020 18:44
Exchange 2013 Shell, Get move request statistics all
$MAILBOXDATABASENAME = "MAILBOXDATABASENAME"
Get-MoveRequestStatistics -MoveRequestQueue $MAILBOXDATABASENAME
@supermarsx
supermarsx / Set-PopImapWildcardCert.ps1
Last active July 18, 2020 19:02
Exchange 2013 Shell, Set IMAP, POP wildcard certificate
$SERVERNAME = "SERVERNAME"
$WDOMAIN = "*.DOMAIN.COM"
Set-PopSettings -X509CertificateName $SERVERNAME
Set-ImapSettings -X509CertificateName $SERVERNAME
$Cert = Get-ExchangeCertificate | ? Subject -like $WDOMAIN
Enable-ExchangeCertificate -Thumbprint $Cert.Thumbprint -Services POP,IMAP
Get-ExchangeCertificate
@supermarsx
supermarsx / Set-ExchangeDNSaddresses.ps1
Created July 18, 2020 18:41
Exchange 2013 Shell, Set DNS lookup addresses
$SERVERNAME = "SERVERNAME"
$LOCALIP1 = "LOCALIP1"
$LOCALIP2 = "LOCALIP2"
Set-TransportService $SERVERNAME -ExternalDnsServer $LOCALIP1, $LOCALIP2
Set-TransportService $SERVERNAME -InternalDnsServer $LOCALIP1, $LOCALIP2
Set-FrontEndTransportService SERVERNAME -ExternalDnsServer $LOCALIP1, $LOCALIP2
Set-FrontEndTransportService SERVERNAME -InternalDnsServer $LOCALIP1, $LOCALIP2
@supermarsx
supermarsx / Set-SmtpPort587Fqdn.ps1
Last active July 18, 2020 19:02
Exchange 2013 Shell, Set smtp port 587 FQDN
$SERVERNAME = "SERVERNAME"
Get-ReceiveConnector | ? Bindings -like "*:587" | Set-ReceiveConnector -Fqdn $SERVERNAME
@supermarsx
supermarsx / Restart-OwaEcpPools.ps1
Last active January 10, 2022 11:52
Exchange 2013 Shell, Restart OWA, ECP Pools
Restart-WebAppPool MSExchangeOWAAppPool
Restart-WebAppPool MSExchangeECPAppPool
iisreset /noforce
@supermarsx
supermarsx / Disable-SslOffloading.ps1
Created July 18, 2020 19:15
Exchange 2013 Shell, Disable SSL offloading
appcmd set config "Default Web Site/owa" /section:access /sslFlags:None /commit:APPHOST
iisreset /noforce
@supermarsx
supermarsx / Watch-MoveRequestStatisticsAll.ps1
Last active July 19, 2020 11:42
Exchange 2013 Shell, Watch move-requeststatistics all
$MAILDATABASE = "MAILDATABASE"
$TIMEBETWEEN = 5
while (1) {
$CurrentStats = Get-MoveRequestStatistics -MoveRequestQueue $MAILDATABASE
cls
Write-Output $CurrentStats
sleep $TIMEBETWEEN
@supermarsx
supermarsx / Suspend-MoveRequestAll.ps1
Created July 19, 2020 15:54
Exchange 2013 Shell, Suspend every in progress move-request
Get-MoveRequest -MoveStatus InProgress | Suspend-MoveRequest
@supermarsx
supermarsx / Restart-MoveRequestAll.ps1
Created July 19, 2020 15:55
Exchange 2013, Restart every suspended move-request
Get-MoveRequest -MoveStatus Suspended | Restart-MoveRequest
@supermarsx
supermarsx / Get-WebminPort.sh
Created July 19, 2020 18:08
Linux Webmin, Get webmin configured port
grep -r "port=" /etc/webmin/miniserv.conf