Drives

Notice that we didn’t need to call the New-Object cmdlet to create an instance of the DriveInfo class. That’s because we’re getting information about all the drives, we don’t want information about a specific drive.

You can also use the Get-PSDrive cmdlet to return all the PowerShell drives: