Argere mich nun schon einige Zeit mit dem Versuch herum analog dem VBscript das Ganze in Autoit umzusetzen...
'// vbscript Create collection.
Set newCollection = swbemconnection.Get("SMS_Collection").SpawnInstance_
newCollection.Name = newCollectionName
newCollection.Comment = newCollectionComment
newCollection.OwnedByThisSite = ownedByThisSite
newCollection.CollectionType = CollectionType
newCollection.LimitToCollectionID = ExistingLimitToCollectionID
'// Save collection and collection path for later use
Set collectionPath = newCollection.Put_
der Wert der dadurch in der Variable collectionPath landet ist dann in etwa
\\SCCM2012.mydomain.net\root\sms\site_S01:SMS_Collection.CollectionID="NOX00019"
; // AutoIT Create the collection.
Local $newCollection = $sconnection.Get("SMS_Collection").SpawnInstance_
With $newCollection
.Name = $newCollectionName
.Comment = $newCollectionComment
.OwnedByThisSite = $ownedByThisSite
.CollectionType = $CollectionType
.LimitToCollectionID = $ExistingLimitToCollectionID
EndWith
;// Save collection and collection path for later use
Local $collectionPath = $newCollection.Put_
Leider bleibt die Variable hierbei einfach Leer grümel...
Müsste wohl anderen auch schon so ergangen sein Ideen? kreative Lösungen?