Concatenate Cmdlet output with string

Viewed 4380

How do I output to the host the combination of the output of a command and a literal string on a single line?

I'm trying to combine: (Get-BitLockerVolume -MountPoint X:).EncryptionPercentage (which returns 12) with the literal '% complete' as follows:

(Get-BitLockerVolume -MountPoint X:).EncryptionPercentage + '% complete'

In return I expect to get:

12% complete

Instead I get the error Cannot convert value "% complete" to type "System.Single". Error: "Input string was not in a correct format."

How can I do this on a single line? I've searched for a solution but apparently don't know how to phrase this question because I keep getting information on how to concatenate strings or variables, but not command output. Examples: PowerShell: concatenate strings with variables after cmdlet

2 Answers
Related