How can I add error levels to the PowerShell command below or set up a variable based on the results.
I need to command to return a value as to whether to hard drive is an SSD or a regular hard drive.
If it is an SSD go to end of file if it is not an SSD open a message box that hard drive needs to be replaced.
powershell.exe “exit ((get-physicaldisk).MediaType) -ne ‘SSD'” && echo SSD
Thanks for your help with this this
I have not been able to get a to return any error level.
The command will echo if an SSD but will exit if not and SSD