Today’s Blog: Essential Commands for Daily Use!

Introduction

In today’s blog, I’ll be sharing some basic, yet incredibly useful, PowerShell commands that you can use on a daily basis. These commands cover a range of tasks such as checking system details, monitoring processes, and managing disk usage. I won’t be going too deep into each command today, but these are some of the most common ones you’ll find useful. I’ll keep updating this post with more commands as needed.

1. Check if a Domain is Resolving Correctly:

If you need to verify if a domain is resolving correctly or find out its IP address, you can use the following command:

 Resolve-DnsName -Name dbtuhub.com

This command helps you retrieve DNS information for the specified domain.

2. Check Page File Configuration:

To check the configuration of your page file (virtual memory), use:

 wmic pagefile list /format:list

This command provides information on your system’s page file settings.

3. Top 10 Processes Using Virtual Memory:

If you want to identify the top 10 processes using the most virtual memory (VM), use:

 Get-Process | Sort-Object -Descending -Property VM | Select-Object -First 10 Name, VM

This command lists the processes consuming the most virtual memory, helping you monitor system performance.

4. List Installed Applications:

To get a list of all installed applications on your system, use:

 Get-WmiObject -Class Win32_Product | Select-Object Name

This command will display the names of all installed software.

5. Disk Space Usage:

If you want to see the usage of connected disks and their free space, use:

 Get-PSDrive -PSProvider FileSystem

This command shows you the details about your file system drives, such as space used and free space.

6. Check OS Version:

To check your operating system’s name and version, run:

 systeminfo | findstr /B /C:”OS Name” /C:”OS Version”

This command gives you a quick overview of your system’s OS.

7. System Boot Time (Uptime):

To get the system uptime or the time since the last restart, you can use:

 systeminfo | find “System Boot Time”

This command will tell you when the system was last rebooted.

8. Get System Information (Detailed Hardware and Software Info)

Use this command to retrieve detailed hardware and software info, such as CPU, RAM, and OS details.

 Get-WmiObject -Class Win32_ComputerSystem | Select-Object *

9. Test Active Directory Trust Relationships

Verify the trust relationships between domain controllers and forests.

Test-ADTrust -Identity “DomainName”

10. Check Event Logs for Specific Errors

Search through the event logs for specific errors or warnings, which is useful for troubleshooting.

 Get-WinEvent -LogName System | Where-Object {$_.LevelDisplayName -eq “Error”}

These are just some of the basic and daily-use commands that can make system management easier. I’ll be adding more commands in future updates, so stay tuned!

Leave a Comment