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