In PowerShell v2, to declare a function parameter as mandatory, you would decorate the parameter like this:
param( [Parameter(Mandatory=$true)] $p ) in PowerShell v3, those attributes default to $true, so you get away with: param( [Parameter(Mandatory)] $p )