How to retrieve the Hyper-V virtual machine’s serial number with PowerShell? Sometimes you need to have the serial number of a Hyper-V virtual machine (VM, or guest). We, for instance, use this serial number in our automatic, unattended deployment of the guest operating system. But then you need to know how to find this serial number…Read more
PowerShell code snippets, examples and info for Windows Server administrators. Maybe some AppCmd and DISM as well.
How to monitor Windows Servers with PowerShell
As a Windows Server and IIS administrator, you want your Windows services to run at all times. One can monitor Windows services in many, many, ways. Some of our customers websites may depend on certain services, which may be hard to monitor externally. For those Windows services that need local monitoring, I like to schedule a PowerShell script. Here is one…Read more
To get and set File Server Resource Manager NTFS quota, you now have to use PowerShell‘s FileServerResourceManager cmdlets. In the past, I used to get and set NTFS directory quota with the
dirquota command, which is deprecated. A behavioral change for me (and you?) I can live with: it’s pretty easy to get directory information with
Get-FsrmQuota and change dirquota using
By default, an IIS application pool (or “AppPool”) recycles on a regular time interval of 1740 minutes, or 29 hours. One reason for this time interval is that application pools don’t recycle at the same moment every day (every day at 07.00 for example). However, sometimes you want to change this regular time interval to a specific time schedule. And when you try to configure this in IIS Manager, it gives you an error. Luckily, AppCmd and PowerShell come to the rescue!Read more
Find all files from one owner in Windows using PowerShell
In Windows, you sometimes need to find all files owned by a specific user. Recursively on your Windows Server NTFS file system. PowerShell has some nice cmdlets and features to automate this task for you. Here you’ll find example PowerShell scripts to find and list files owned by a specific user…Read more
How to add DNS servers – or resolvers – to a Windows Server network adapter, or interface using WMI and the
netsh command. This one is quite old but may come in handy sometimes. In this example we use Google’s Public DNS server addresses and localhost to add as DNS Servers on our server.
How to use PowerShell to create websites and application pools in IIS… A client of the company I work for wanted to quickly add 60 sub-domains to his website. But, the sub-domains had to be created as self contained IIS websites, and running in their own application pools. Luckily, the client wanted 60 consecutive sub-domain names, e.g. “sub01.example.com”, “sub02.example.com”, …, … up till “sub60.example.com”. This made our task a bit easier, because we could easily script this in PowerShellRead more
25 Most Popular Tags
Proudly hosted by
Email: firstname.lastname@example.org (remove no-spam)
15 Most popular entry posts you might like
- List all SPNs used in your Active Directory
- Remove IIS Server version HTTP Response Header
- PowerShell return value, exit code, or ErrorLevel equivalent
- Explicit Congestion Notification (ECN) slows down outbound connections
- 5 Extra ways to clean up disk space in Windows Server
- Disk Cleanup in Windows Server
- Tunnel RDP through SSH & PuTTY
- WsusPool keeps crashing: stops again and again
- HTTP to HTTPS redirect using IIS web.config
- Fatal error: Uncaught Error:  operator not supported for strings – PHP 7.1
- MySQL InnoDB performance improvement: InnoDB buffer pool instances – Updated!
- "The length of the URL for this request exceeds the configured maxUrlLength value"
- Fix "Could not establish trust relationship for the SSL/TLS secure channel" error
- How to install IIS URL Rewrite Module on Windows Server 2016 & IIS 10
- Set IIS Application Pool recycle defaults to Specific Times, not Regular Time Interval