Anduin Xue

let today = new Beginning();

PowerShell and Windows Server Tips about PowerShell and Windows Server


Some Windows PowerShell tricks

Here are some PowerShell tricks that works on Windows. Add a path to System PATH environment variable. function AddToPath { param ( [string]$folder ) Write-Host Adding $folder to environment variables... -ForegroundColor Yellow $currentEnv = [Environment]::GetEnvironmentVariable(Path, [EnvironmentVariableTarget]::Machine).Trim(;); $addedEnv = $currentEnv + ;$folder  …


Build a new NFS server with WinServer or Ubuntu and mount it

Windows Server On Windows Server, creating a new NFS server is simple. First install this: file And then click the folder properties. file And enable that. file Ubuntu Run: sudo apt update sudo apt install nfs-kernel-server -y sudo mkdir -p /mnt/nfs_share sudo chown -R nobody:nogroup /mnt/nfs_share/ sudo chmod 777 /mnt/nfs_share/ And edit the configuration: sudo vim /etc/exports Add this: /mnt/  …

Linux Ubuntu File Windows Server Share NFS VMware ESXI Vsphere NAS

Use you local server to replace the cloud with FRP.

Why am I doing this? I've been complaining: the public cloud is too expensive. A typical server costs about 150USD a month. And because I use a lot of Azure PaaS services, my current business needs to cause me to spend more than 500USD per month. In addition, the database and App Service are both costly. This practice proves: that using Azure is very expensive. So I've been thinking: I have a lot  …

IP bash Linux Windows Server Cloud FRP Network Port Firewall

Best practice after installing Windows Server | Why you should NEVER use 'Administrator' user?

This article helps you change the following items if your cloud provider didn't do that for you. Rename server, (optional) join AD domain. Create your own account instead of Administrator. Disable Administrator login. Change remote desktop default port. Disable IIS dangerous protocol. Install some very infrastructure tools. After you buying a Windows Server from some cloud provider, or just  …

Security Windows Server Cloud Configuration

Install WinGet on Windows Server

Before starting, you need to make sure that you are NOT running under Administrator account! Administrator account can NOT start store apps. After starting new Windows Server, start a new PowerShell session with Administrator privilege. Run the following commands: function Install-Package { param ( [string]$PackageFamilyName ) Write-Host "Querying latest $PackageFamilyName  …

PowerShell Windows Server Install Winget Automation

Install Windows 11 on Vultr cloud machine

In this blog, I gonna draft a solution for you to install any Windows OS on the Vultr cloud server.   Before starting Before starting, there are several points about why I choose Vultr and why you need to build a Windows 11 image on Vultr. Vultr is cheap Compared with other cloud service providers, Vultr is cheap. A 4GB RAM, 80GB SSD machine, costs about 24USD per month. While other platforms  …

PowerShell Windows Server Cloud Windows Windows 11 DISM Bcdedit Vultr Cloud PC

Use Windows as a stateless OS on your devices

Why stateless device, stateless OS? OS might be buggy Now Windows 11 is very buggy. Stuck everyday. Unresponsive everyday. Store stop working every day. Since those tiny problems emerge endlessly on Windows 11. Often inexplicable systems will fall into weird failures. Solving these problems is very difficult, and it may require us to understand how Windows works. However,  …

PowerShell Windows Windows 11 Automation Configuration Device Reimage


Install Windows 11 side-by-side without a USB drive

This tutorial only for existing Windows users which needs to install the second Windows along-side it without USB disk or CD. How When you have the Windows installer, you can directly unzip the install.wim to a new partition. This process does not need to restart or enter the PE environment, so no USB storage disk nor CD is required.   After the decompression is complete, directly boot the new  …

Windows 10 PowerShell Windows Windows 11 Install DISM Bcdedit Boot BCD

The simplest way to retry in PowerShell

$attempt = 0 do { try { Do-SomeThing-That-May-Crash-Here $success = $true } catch { if ($attempt -eq 5) { throw } Write-Host "Task failed. Attempt $attempt. Will retry in next $(5 * $attempt) seconds. Error: $($Error[0])" -ForegroundColor Yellow Start-Sleep -Seconds $(5 * $attempt) } $attempt++ } until($  …

PowerShell Retry

Enable PowerShell remoting for Windows Server machines

Like you can use SSH to execute remote command on a remote Linux machine and you can also execute remote PowerShell on a target Windows Server. To enable it with a self-signed certificate, execute the following command: (Execute it on your server) > Get-ChildItem WSMan:\Localhost\listener | Remove-Item -Recurse # Remove old listeners > Cert = New-SelfSignedCertificate -CertstoreLocation  …

PowerShell Windows Server Remote Management WMI

  • 1