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 […]
PowerShell Command to Create A Network Share
In this article, you will learn on how to create a folder share using a PowerShell command. First, you need to determinate which folder you want to share, or you can create a new folder using New-Item cmdlet as below New-Item “C:\SharedFolder” -Type Directory You can also add the -Force parameter to make the folder […]
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 […]
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 […]
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 […]
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 […]
PowerShell Script to add Multiple IP Address
Adding multiple IP Addresses on the windows server using a graphical interface is really a pain as each IP Address need to be assigned manually. Through this article, I will show you how to add multiple IP Addresses using PowerShell command. First, you need to get the Interface Index or Interface Alias of the NIC […]
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 […]
Enable PowerShell Remoting
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 […]
PowerShell Script: Get Certificate that will be expired soon
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 […]