powershell convert type code example Example: change data type powershell [int]$var = (Get-DefaultAudioDeviceVolume).Replace("%","")