Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

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