Generate self-signed SSL certificate on Windows Server with Powershell

Use the Powershell command below to generate a self-signed SSL certificate on a Windows Server 2019+. Make sure you run the Powershell Window as Administrator. Step 1: Generate self-signed certificate with one CN name. The command below generates the SSL certificate and automatically imports it to the local machine certificates in this folder: “Local Computer\Personal\Certificates”.… Continue reading Generate self-signed SSL certificate on Windows Server with Powershell

Java get all enabled TLS cipher suites on Windows via Powershell

A Java installation by default supports various TLS ciphers for Java applications that use HTTPS / SSL. Some of these TLS ciphers are marked as “vulnerable” and should not be used in production environments for security. Examples of this are TLS 1.0 and TLS 1.1 ciphers, which are deemed no longer secure and should not… Continue reading Java get all enabled TLS cipher suites on Windows via Powershell

Send email via Powershell

If you want to send an email via Powershell, e.g. to test if a local SMTP server is able to receive incoming email, you can use the following Powershell command: Replace the example values in the command above to the credentials used in your situation: -SmtpServer Servername (DNS) or IP address of the server which… Continue reading Send email via Powershell

Published
Categorized as Powershell

Powershell export and import installed Windows Server roles and features

You can use the Powershell snippet below to simply export all installed Windows Server Roles and features from a Windows 2019 Server. You can save the roles in a CSV files, and with the second command you are able to automatically install all the exported roles and features to another Windows Server. This is an… Continue reading Powershell export and import installed Windows Server roles and features

How to check ADLDS replication status with custom host/port

If you want to check the replication status of an ADLDS (Active Directory Lightweight Directory Services) instance, you can use the command repadmin. By default all commands issued to repadmin will use the default LDAP ports (389/636). If your ADLDS instance uses different ports, you can add a parameter to the repadmin command. 1. Check… Continue reading How to check ADLDS replication status with custom host/port

Powershell check if an AD Group Managed Service account (GMSA) is correctly installed on Windows Server

If you wish to check if a Windows Group Managed Service Account (GMSA) is correctly installed (and available for use) on a Windows machine, you can do the following. Open a new Powershell Window First make sure that the Active Directory Powershell feature is enabled on the server. Do this by issuing this command: Afterwards,… Continue reading Powershell check if an AD Group Managed Service account (GMSA) is correctly installed on Windows Server