rieskaniemi.com

yet another it blog

powershell logo

Convert SID to username using PowerShell

/

Many times when inspecting logs you may encounter security identifiers (SID) instead of usernames. What if you would like to know the account behind this security identifier? This can be easily done with few line of PowerShell. Simple and quick.

Generate long Azure application secrets using PowerShell

/

Azure portal limits secrets to expire every 2 years. Using PowerShell you can bypass this limit and create secrets past 2 years limit First install Azure AD PowerShell module if not already installed. Install-Module AzureAD After installation connect to Azure AD and run following commands to create new secret. In our example we create secret …

WordPress

Microsoft Entra ID (Azure AD) Single Sign-On (SSO) to WordPress

/

Organizations using WordPress as content management software (CMS) can take advantage of all security features implemented to Azure AD such as conditional access when logging into WordPress. This way access to WordPress could be limited to trusted devices only. Implementing SSO is easy as there are various OpenID plugins available. I am using a plugin …

Microsoft Hyper-V

Hyper-V – Error applying live migration changes, failed to modify service settings.

/

When you are trying to enable live migration on Hyper-V you get error message stating “Error applying live migration changes. Failed to modify service settings” This might be result of server crash. Luckily this is easily fixed by renaming (or deleting) corrupted policy file from folder C:\Windows\System32\GroupPolicy\Machine Rename Registry.pol to Registry.pol_old or similar and apply …

Lemon Duck Kill chain

Block malware with Windows Firewall and Group Policies

/

A lot of malware uses common tools built into Windows for downloading payloads from remote servers. (Image Copyright Sophos Labs) Many of Antivirus and intrusion detection systems can block these kind of activities but similar protection can be done for no additional costs with Group Policy & Windows Firewall. Blocking PowerShell and other tools from …

SendGrid Logo

Postfix SMTP relay to SendGrid

/

Postfix can be configured to relay outbound emails trough SendGrid service by adding few lines to postfix configuration. First create API key in SendGrid service. Go to API keys, crate new API key and set access permission to “Restricted Access” and only allow “Mail send” as we wont be needing any other access rights. Copy …