Effectively my problem comes down to this:
I can\'t have a function with a mandatory parameter and pass $null to that parameter:
Function Foo { P
I think you missed the "," to separate the parameters.
Param ( [string]$ObjectName, [int]$ObjectId, [wmi]$Object )