How to pass an argument to a PowerShell script?
There's a PowerShell script named itunesForward.ps1 that makes the iTunes fast forward 30 seconds: $iTunes = New-Object -ComObject iTunes.Application if ($iTunes.playerstate -eq 1) { $iTunes.PlayerPosition = $iTunes.PlayerPosition + 30 } It is executed with prompt line command: powershell.exe itunesForward.ps1 Is it possible to pass an argument from the command line and have it applied in the script instead of hardcoded 30 seconds value? Ocaso Protal Tested as working: param([Int32]$step=30) #Must be the first statement in your script $iTunes = New-Object -ComObject iTunes.Application if (