Previous
Left Arrow
PowerShell Get-FileMetaData - Remove Unicode Characters from Output
Current Code Entry
Next
CFF Coding Source - 
PowerShell - Export SSL Certificate, Copy to other Network machines, Import SSL Certificate on each machine
  • PowerShell commands every IT person should know.

    Article Entry Date: April 5,2025 @ 06:23:33 / Last Updated On: April 16,2026 @ 06:43:06
Here, I will list all the commands I use and come across. (I will try to update it regularly)
I will also link to other Articles with commands used in real-world scenarios.
[Right-click] in the textarea and choose to [Select All]
(or) [Left-click] in the textarea and click [Crtl+A].
Then [Ctrl+C] to copy.

A fast way to access [PowerShell].
Perform the following to make it easy to open [PowerShell].
[Shift + Right-click] mouse ▶ [Open PowerShell window here].
(This works in both [CMD] and [PS])
Reboot your system. (Change the 0 value to the number in seconds that you wish to shut down or restart your system)
(This works the same on both CMD and PS.

Shut down your system.

Two ways to clear the lines in the terminal.

To get out of a running process


Other Articles Related to this Entry.


Renaming Network Adapters and Teaming them together«
Enable Firewall rules to allow remote connections to your Server Core«
Windows Server Core Installation Complete Code for PowerShell and Command Prompt«
Installing .NET 4.8 on a Windows Core Server«
PowerShell Get-FileMetaData - Remove Unicode Characters from Output«
Using PowerShell to check the Health and Performance of a hard drive on a Remote Server«


Just found these and had to test them out, and the grid view is an absolute keeper.

Common Use Cases & Examples
Basic View: Quickly view running processes in a searchable table.

Selection for Action: Choose specific services to restart from a list.

Filtered Reporting: Display specific object properties with a custom window title.

Script Shortcuts: Use the -Wait parameter in Windows shortcuts to keep the window open until you manually close it.

Get the Physical Disks on your computer.

Get the Drives in your computer.

Get the Directory Folder structure in a Tree hierarchy.

Another Tree Output

The [Test-NetConnection] cmdlet displays diagnostic information for a connection. It supports ping test, TCP test, route tracing, and route selection diagnostics.

Have your Terminal read to you.

The code for the page above is.


[Server Admins]
Configure Your Windows Server

Get a list of all network adapters.

In all our servers, I name the Network Adapters to make it easier to Team them together.
Performing this on many VMs is made simple using the two scripts below.

And then I team the NICs together. (Teaming is a way to create redundancy in your server's networking.
If one adapter goes down, the next one in line will take over, keeping your server online at all times. (0 Downtime and 99% Uptime)

Get the Name of the NIC Team

If, for some reason, you need to rename the team.

If you need to remove the NIC Team.

Need to remove a Server from the domain.

Check if the Windows Remote Management (WinRM) service is running and responsive on a local or remote computer.
Get the Product Vendor and Product Version Number of a Remote Server

Open Notepad as Administrator

Promote one DC to be the Master.
If you have many DCs in your network and want to promote one of them to be the Master, run this script.
Change the DC-01 to the name of the DC you want to promote.

After performing the above steps, run this command to verify that the DC you promoted is indeed the one in charge.
Flexible Single Master Operations

Output should be something like this.
Schema master DC-10.my-domain.local
Domain naming master DC-10.my-domain.local
PDC DC-10.my-domain.local
RID pool manager DC-10.my-domain.local
Infrastructure master DC-10.my-domain.local
The command completed successfully.



▼ PowerShell and IIS (Internet Information Services) ▼


To get the Server Farm name.

Output = Farm-01

If you need to see if a website is up and running or returning errors before you release it to your Web Farm.
Run this on your ARR Server.

On your Web Server, if you need to run a test before releasing it, to ensure there are no issues.
Run this.

The output from both of the above will look something similar to this.

StatusCode : 200
StatusDescription : OK
Content :
Server WEBCORE-02 Up!
With domain: cffcs.com
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
X-Frame-Options: sameorigin
Content-Length: 51
Cache-Control: private
Content-Type: text/html
Date: Thu, 16 Apr 2026 19:52:24 GMT
Set-Cookie: ASPS...
Forms :
Headers : {[Access-Control-Allow-Origin, *], [X-Frame-Options, sameorigin], [Content-Length, 51],
[Cache-Control, private]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml :
RawContentLength : 51


You can even test out your URL Rewrite with this command as well.

The output will start off the same as above, but will include the HTML header of your page.