The following script fails when I use the Set-StrictMode statement. Without the statement it works fine.
Set-StrictMode -Version Latest
Param(
[string]$ComputerName = 'localhost'
)
Get-CimInstance -ClassName win32_OperatingSystem -ComputerName $ComputerName