• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Think PowerShell

PowerShell for IT Pros

  • About
    • Who I Am
    • Why I Blog
    • Privacy Policy
  • Resources
    • More PowerShell Sites
    • Post Series Index
  • Get Help
  • Show Search
Hide Search

Aaron Rothstein

PowerShell replacement for ‘chkdsk’

Aaron Rothstein · Nov 30, 2019 · Leave a Comment

Repair-Volume interactive progress bar

Fix your disk using the PowerShell successor to chkdsk, Repair-Volume.

Fixing a corrupted file system, the old way

At some point in your IT career, you’ve likely encountered a few bad sectors on a hard drive. The impact can be anything from stuttering performance to a non-starting computer.

Since 1981, chkdsk has been the go-to built-in Microsoft utility for scanning and fixing the disk. By “fixing” I don’t mean it can physically repair the disk itself, but checking the file system integrity and fix any logical file system errors.

While chkdsk is still available in Windows today, a successor PowerShell cmdlet was introduced in Windows Server 2012, Repair-Volume.

[Read more…] about PowerShell replacement for ‘chkdsk’

Using the Windows PowerShell Compatibility Module in PowerShell Core

Aaron Rothstein · Nov 7, 2019 · 1 Comment

Windows Compatibility Module is located in github.com

Access and use Windows PowerShell cmdlets from your PowerShell Core session on a Windows computer.

Missing cmdlets from PowerShell Core

In the last post, we installed PowerShell Core on a Windows computer. However, if you were to try using some common Windows PowerShell cmdlets from the session or via script, such as Get-WmiObject, you would get an error (below) because Get-WmiObject is a Windows PowerShell cmdlet and not part of PowerShell Core.

PS C:\Users\Demo> Get-WmiObject -Class Win32_ComputerSystem                                                             Get-WmiObject : The term 'Get-WmiObject' is not recognized as the name of a cmdlet, function, script file, or operable program.                                                                                                                 At line:1 char:1                                                                                                        + Get-WmiObject -Class Win32_ComputerSystem                                                                             + ~~~~~~~~~~~~~                                                                                                         + CategoryInfo          : ObjectNotFound: (Get-WmiObject:String) [], CommandNotFoundException                           + FullyQualifiedErrorId : CommandNotFoundException                                                                                                                 

Install Windows PowerShell Compatibility Module

Recognizing that in order to get Windows users to start installing and using PowerShell Core it had to be on par with Windows PowerShell, Microsoft released the Windows PowerShell Compatibility Module. This module makes Windows PowerShell cmdlets available from a PowerShell Core session.

[Read more…] about Using the Windows PowerShell Compatibility Module in PowerShell Core

Install PowerShell Core on Windows

Aaron Rothstein · Feb 28, 2019 · Leave a Comment

Install manually via MSI or with the Chocolatey package manager.

Installing PowerShell Core using MSI

The primary way for installing PowerShell Core is to download the official MSI release from the PowerShell GitHub page. Scroll down to Get PowerShell and click the .msi link from the Downloads (stable) column for your version of Windows (either x86 or x64).

[Read more…] about Install PowerShell Core on Windows

Decision to Switch to PowerShell Core (pwsh)

Aaron Rothstein · Feb 25, 2019 · Leave a Comment

Slightly different icon of PowerShell Core.

The decision is clear: it is time to switch to PowerShell Core.

A lot has happened since the last time I published a post (November 2017), including the release of PowerShell Core 6.0 in January 2018.

[Read more…] about Decision to Switch to PowerShell Core (pwsh)

Use PowerShell to Monitor RSS/Atom Feed

Aaron Rothstein · Nov 30, 2017 · 4 Comments

An script for monitoring Digital Ocean feed.
An script for monitoring Digital Ocean feed.

Use PowerShell’s Invoke-WebRequest to retrieve and parse an RSS or Atom feed.

Status monitoring feeds aplenty

There are a lot of third party services that provide status monitoring updates through RSS/Atom feeds. Statuspage is a popular service that other companies use for providing this type of status monitoring feed, as well as a status page for web viewing.

For my case, I wanted to take advantage of monitoring one of these status feeds, but I wanted to do it using PowerShell so I could send email alerts and display status information within Solarwinds Orion. Here is how I used the Atom feed from DigitalOcean‘s Statuspage.

[Read more…] about Use PowerShell to Monitor RSS/Atom Feed

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 7
  • Go to Next Page »

Primary Sidebar

Aaron

Follow

Copyright © 2023 · Monochrome Pro on Genesis Framework · WordPress · Log in