Hi all, I am using the following code to create a Windows share on a remote server:
Code:

$oServer = GetObject("WinNT://MyDomain/" + $FileServer + "/LanmanServer")
$oShare = $oServer.Create("fileshare", $UserName + "$")
$oShare.Path = "D:\Users\" + $UserName
$oShare.MaxUserCount = -1 ; unlmited users
$oShare.SetInfo



which works admirably, but how do I detect an error if the share already exists or some other error occurs? In VBscript there is an Err object which can be queried after the SetInfo() call. Is there a similar thing for Kix, or can I access the Err object?