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