Windows Server Core: How to start PowerShell by Default

Windows server core

By Default, Windows Server Core will start Command Prompt (cmd). However, if you would like to change the default cmd to PowerShell, you can change it by changing the Registry value. The Registry that I’m talking is located under the following location HKLM:\Software\Microsoft\Windows NT\CurrentVersion\WinLogon Let’s change this setting to make the Windows Server Core starts … Read more

How to resolve “The trust relationship between this workstation and the primary domain failed”

Sometimes, you receive the alert “The trust relationship between this workstation and primary domain failed” when you login to the computer that joined to the domain. There are many ways to resolve this issue. Through this article, I will show you how to resolve this issue using PowerShell command. Step 1. Login to the problematic … Read more

Manage Windows Update using PowerShell

Managing windows update using PowerShell command is very helpful once the GUI is not available such as Windows Server Core or using PowerShell Remote. There are many ways managing Windows Update using PowerShell, through this article, I will show how to manage Windows Update using PowerShell Module created by MichalGajda. This module called PSWindowsUpdate, allows you to … Read more

Backup MySQL Database using PowerShell Script

Performing regular database backup is very important to avoid data loss. In this article, we will create a PowerShell Script to backup MySQL databases. Basically, the backup is using mysqldump command. This is an executable file that stored in MySQL installation folder under bin folder.  So let’s start scripting : You can set a Task Scheduler to … Read more

Get public IP on a Windows Server via PowerShell

Getting public IP on troubleshot networking issue is very useful. Especially, there is an issue with accessing your server from the external (public) network. Here is how to get your server’s public IP using PowerShell Invoke-RestMethod Command. Also, you can get the detail of your public IP by removing “ip” variable on the command above. There are … Read more

PowerShell script is not digitally signed

When you try to run a PowerShell script that has not been signed by Trusted Publisher, you may get the following security error. <PowerShell Script file> is not digitally signed. You cannot runthis script on the current system. For more information about running scripts and setting execution policy, seeabout_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170. How to resolve the … Read more

Enable PowerShell Remoting

PowerShell

The Windows PowerShell remoting features are supported by the WS-Management protocol and the Windows Remote Management (WinRM) service that implements WS-Management in Windows. Computers running Windows 7 and later include WinRM 2.0 or later. On computers running earlier versions of Windows, you need to install WinRM 2.0 or later as appropriate and if supported. To … Read more

PowerShell Script: Get Certificate that will be expired soon

PowerShell

I’m back. Yeah, almost 5 weeks I haven’t written something here. This time, I’ve created a PowerShell script that will notify you if there is an SSL Certificate that will expire in days remaining. This script is actually modification script from here. I’ve also uploaded the script on my Github Repo. Below is the complete … Read more