Hello everyone, long time no update this blog. Today, I want to share the PowerShell command to retrieve the password last set from the AD User. Basically, we will use Get-ADUser Cmdlet to do this. To get information about Get-ADUser command you can use PowerShell and type the following command If you look on the […]
One liner command to get VM list detail on Hyper-V Cluster
In this post, I will share a command to get the VM list detail that includes VM Name, CPU Count, IP Addresses, VLAN ID, and Memory assigned. The command includes the command below: Get-VM: This command gets the virtual machines from one or more Hyper-V hosts Get-ClusterNode: This command to gets information about one or […]
Expand three dots (Elipsis) on PowerShell Result Console
Sometimes when you receive the result from PowerShell command, there are three dots (Elipsis) “…” that truncate the result. In this article, I will show you how to expand three dots (Elipsis) on PowerShell result console. For more detail, please see the example below: As you can see, there are three dots (Elipsis) behind “\Exchange […]
Install SSL Certificate for RDS Deployment using PowerShell
I have an issue while installing the SSL Certificate for RDS Deployment using GUI. Therefore, I use the PowerShell command to do that. Basically, the command is using Set-RDCertificate CmdLet. The Set-RDCertificate cmdlet imports a certificate or applies an installed certificate to use with a Remote Desktop Services (RDS) role. You can use this cmdlet to secure […]
Run a SQL Server Query in PowerShell
Yesterday, I got a request from our customer that need to run a SQL Server Query using PowerShell command. After looking on the Google 😀 I found the Script from Romanian Coder. Basically, the script is using System.Data.SqlClient Namespace on NetFramework 4.8. Below is the complete script to Run a SQL Server Query in PowerShell: […]
Change Local Administrator Password
In this article:– Change Local Administrator password using PowerShell on single computer.– Change Local Administrator account password using PowerShell on multiple computer There are multiple ways to change your local Administartor account password. In this article, I will show you how to change local Administrator Password using PowerShell command. Before we continue. here are a […]
Get all VMs VHDX disk size
Sometimes you need to get which VM that most consume the disk storage. You can check the vhdx size by inspecting the disk one by one. However, It will waste the time if there is too many VMs on the Hyper-V server. I’ve created the script that will collect all VM’s vhdx and check it’s […]
Check Folder Size using PowerShell command
Sometimes, you need to know how big a folder using PowerShell command. For the example once you on PowerShell session command and there is no GUI to check how big the folder size. Basically, you can use Get-ChildItem and Measure-Object CmdLet. Below the one-liner PowerShell command to get the FolderSize “{0:N2} MB” -f ((Get-ChildItem C:\users\ […]
Configure the DNS Client using PowerShell
There is a DNSClient module on PowerShell you can use in addition ipconfig command. By default, this command is available on the PowerShell, if not, you can load the module manually using the command below: Import-Module DnsClient To see the available command on DnsClient module, you can use the Get-Command -Module DnsClient As you can see in […]
Windows Server Core: How to start PowerShell by Default
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 […]