Yes, Breaker, you are right.
Here is a full version of the function:

code:
Function WMIConnect(optional $sComputer, optional $suser, optional $spwd, optional $ImpLevel, optional $authLevel, optional $sNamespace)
; ImpersonationLevels:
; Anonymous - Hides the credentials of the caller. Calls to WMI may fail with this impersonation level.
; Identify - Allows objects to query the credentials of the caller. Calls to WMI may fail with this impersonation level.
; Impersonate (default) - Allows objects to use the credentials of the caller. This is the recommended impersonation level for WMI Scripting API calls.
; Delegate - Allows objects to permit other objects to use the credentials of the caller. This impersonation, which will work with WMI Scripting API calls but may constitute an unnecessary security risk, is supported only under Windows 2000.
DIM $locator, $context, $namespace, $moniker

select
case $ImpLevel=1 $ImpLevel = "Anonymous"
case $ImpLevel=2 $ImpLevel = "Identify"
case $ImpLevel=3 $ImpLevel = "impersonate"
case $ImpLevel=4 $ImpLevel = "Delegate"
case 1 $ImpLevel = "impersonate"
endselect
$authLevel = "pktPrivacy"
$moniker = "winmgmts:{impersonationLevel="+$ImpLevel+",authenticationLevel="+$authLevel+"}!\\"
$namespace = "\root\cimv2"
if not $sNamespace $namespace = $sNamespace endif
if not $sComputer OR $sComputer = "@WKSTA" OR $sComputer = "."
; local host
$sComputer = "@WKSTA"
$WMIConnect = GetObject($moniker+$sComputer+$namespace)
else
; remote host
if ($suser AND $spwd) OR $suser
$locator = CreateObject("WbemScripting.SWbemLocator")
$context = CreateObject("WbemScripting.SWbemNamedValueSet")
$WMIConnect = $locator.ConnectServer($sComputer,$namespace,$suser,$spwd,"","",0,$context)
else
; current (local) credentials
$WMIConnect = GetObject($moniker+$sComputer+$namespace)
endif
endif
if @ERROR
$WMIConnect = @SERROR
endif
exit (@ERROR)
EndFunction