Command to get wear percentage on an SSD

The Get-StorageReliabilityCounter cmdlet gets the storage reliability counters for the specified disk or physical disk. These counters include information about such things as the device temperature, errors, wear, and length of time the device has been in use. Example PS C:\WINDOWS\system32> Get-PhysicalDisk | Get-StorageReliabilityCounter | select wear https://docs.microsoft.com/en-us/powershell/module/storage/get-storagereliabilitycounter?view=windowsserver2019-ps