Skip to main content

Posts

Showing posts from January, 2023

How to view windows folder in GB or MB or in human readable sizes

With the era of WSL, Windows Subsystem for Linux is quite helpful. You can now run Linux commands on Windows with ease, or without installing any virtualization software. Of course, having VirtualBox installed with Linux is a different story, since you can have a pure Linux environment. Anyway, WSL provides an easy way to view size or capacity of Windows folder without any scripting using PowerShell or installing any Sysinternal tools. How to view folder sizes in human readable format in Windows using WSL? If WSL has been installed and working correctly, open Windows Terminal an awesome command-line shell application, in which you can run multiple Windows in one screen. And you can also position different windows terminal, either horizontally or vertically and Terminals can be resized the way you wan it. Grab windows terminal from Microsoft Store and for the prize of free. Once the Windows Terminal is open, just cd or browse to the directory where you need to check folder sizes. Just p

How to rip or convert old auido CDs to MP3 or digital format

Old habits are hard to break as they said, however, music of your generation old favorites music of yesteryears will always stay with you. Such music, are hard to forget since the mold your young life or even such songs inspired you to get through difficult times and be who you are today. Or just simply a music of wonderful memories with friends and love ones. Anyway, how to convert or rip CDs to digital format such MP3, WMA,  M4A or any other format that the converter supports. To convert CDs, a CD drive or reader is needed. A built-in CD drive or an external USB-Disk Drive that can read CDs or DVDs. In Windows 11 or Windows 10, these are the steps: Step 1: Insert the Audio CD to the drive Step 2: In the search are beside the windows logo, type: Media and from the search result choose or select the "Media Player". Step 3: In the top left hand side of the Media Player, you will see the Album of the insert CD, it will either show the album name, or if Media Player will not be

PowerShell query event log last reboot or shutdown

Querying when was the last time the server  or computer is  essential in troubleshooting or auditing the server. Or in production system, computers or servers, must scheduled a downtime and let stakeholders know that at this specific date and time there will be a down time and services will not ne available at the said time and date. Even in development servers or computers, checking when was the last time the computer restarted or shutdown is quite essential. If the application is buggy,  or has some memory leak or other issues then it will cause the system to reboot, shutdown or crash. PowerShell comes in handy in querying event log; when was the last time the computer has shutdown or rebooted. Of course, event log can be checked manually. But scrolling through the 100 or thousands of event logs is quite tedious. So, PowerShell comes to a rescue  and avoid the tedious, manual finding of the event log. Here's a sample code snippet on how to query Windows event log when was the ser

PowerShell Compare and Get Hash File

 Hash File comparison is a good thing to do, to make sure that file in transit, transferred, downloaded, or copied over is not corrupted or has been altered or modified. PowerShell has a built-in module to do this that makes life easier and an easy task to do. Here's an example code snippet to do this: #Path location of the file $file="C:\Users\User1\Downloads\Win10_22H2_EnglishInternational_x64.iso" # Get the file hash $hashSrc = Get-FileHash $file -Algorithm "SHA256" write-output $hashSrc #copy the Hash file  $Display_hash_only = $hashSrc | Select-Object -Property Hash | ft -HideTableHeaders Write-Output $Display_hash_only Output of the write-output $hashSrc command, will show the Algorithm used, the Hash of the file and path location of the file. Algorithm : SHA256  Hash: AC5522F9DB9F4F432A1AADE69FEF268C8C0B5FD3F22D3A6987719752F8A7108   Path : C:\Users\User1\Downloads\Win10_22H2_EnglishInternational_x64.iso  After getting the Hash File run this code snippet b