GENERIC FAILURE WMI New Advertisement

Microsoft Systems Management Server

    Sponsored Links

    Next

  • 1. Linked Collections
    In order to deploy a piece of software I have created a collection called Software X. I also have collections for various geographical regions in my company. When we are ready to deploy the software to a specific region I add that regions collection as a sub-collection of the collection Software X. This works out great, but I know that there are some clients that are not captured by the region collection. When Ie added all the regions I would like to go back and then advertise to the All Systems collection, thereby capturing the missing clients. I have two questions. First, if a computer is a member of two different collections that receives the same package I assume they will only receive the package once. Is that correct? Second, if I change the advertisement collection from Software X to All Systems will the package re-run on all the clients? I don want it to, I just want to make sure it doesn. Thanks Chad
  • 2. Copying or exporting packages between SMS servers
    What's the easiest way to copy or export packages between SMS servers (SMS 2003 SP3)? Also, when using an MSI file to create a package, it puts the /m parameter (for MIF information). Is this unique between different servers, or, will it always be the same based on MSI GUID? Thanks!
  • 3. House Keeping?
    Can someone explain to me the process of cleaning up the packages that are downloaded to the clients if the option "download and run locally" is selected? I have been testing the deployment of some software and I now have 4 different directories under \SystemRoot\CCM\Cache with the same software in it. Can I safely delete them, or does SMS clean them auto-magically? Thx.
  • 4. Advertisement Status not showing status messages
    I have 1 central site with 2 Primary sites running SMS 2003 SP2. From my Central Site when I look at an Advertisement status I am able to see the number of received, failures, etc. but when I attempt to look at the status messages from 1 of my Primary sites the Status message viewer does not show any messages. My other primary is showing all the status messages without any problems. I've been through all the logs on my primary and central server and don't see anything that would indicate a problem. If I connect directly to my primary site I can view the status messages; for some reason I can not view them from my Central site. Any assistance would be greatly appreciated.
  • 5. Best Practise Papers about Collection Design
    Hi Does anybody have best practise papers about collection design? Thanks Fabian

GENERIC FAILURE WMI New Advertisement

Postby U2hyaW1wQm95 » Sat, 27 May 2006 00:03:01 GMT

i!

I created a Class to connect and create a new SMS Adverti{*filter*}t...

Got GENERIC FAILURE error when running Adverti{*filter*}t.Put_

WHY???

I'm really disapointed since I used to code provided by Microsoft on this page
http://www.microsoft.com/technet/prodtechnol/sms/sms2003/fa6b79fe-b44f-4f03-a9f7-eaf409f1462c.mspx

I really hope to find a solution as soon as possible!

Thanks!

ShrimpyOne

So here is my code...

Imports WbemScripting

Public Class ClsSMSQM

Private Const STORAGE_NEEDS_SPECIFYING = 0
Private Const STORAGE_NO_SOURC = 1
Private Const STORAGE_DIRECT = 2
Private Const STORAGE_COMPRESS = 3

Private Const TYPE_PACKAGE = 2
Private Const TYPE_ADVERTI{*filter*}T = 3
Private Const TYPE_QUERY = 7
Private Const TYPE_REPORT = 8
Private Const TYPE_SOFTWARE_METERING = 9


Private Locator As SWbemLocator
Private Server As SWbemServices

Public Event SMSQMError(ByVal Message As String, ByVal Exception As
Exception)
Public Event SMSServerConnected()


Public Sub Connect(ByVal SMSServer As String)

Try

Locator = New SWbemLocator
Server = Locator.ConnectServer(SMSServer, "root\sms")

Catch ex As Exception

RaiseEvent SMSQMError("Unable to connect to specified SMS
Server!", ex)
Exit Sub

End Try

Dim Sites As SWbemObjectSet
Dim Site As SWbemObject
Dim SiteCode As String

Try

Sites = Server.ExecQuery("Select SiteCode From
SMS_ProviderLocation Where ProviderForLocalSite=True")

For Each Site In Sites
SiteCode = Site.SiteCode
'Exit For
Next

Server = Locator.ConnectServer(SMSServer, "root\sms\site_" &
SiteCode)

Catch ex As Exception

RaiseEvent SMSQMError("Unable to connect to specified SMS Server
Main Site!", ex)
Sites = Nothing
Site = Nothing
SiteCode = Nothing
Exit Sub
End Try

Sites = Nothing
Site = Nothing
SiteCode = Nothing

RaiseEvent SMSServerConnected()

End Sub


Public Function NewAdverti{*filter*}t(ByVal Name As String, ByVal
CollectionID As String, ByVal PackageID As String, ByVal ProgramName As
String, Optional ByVal Comment As String = "Created with SMSQM by Frederick
St-Gelais", Optional ByVal ContainerID As Integer = 0) As Boolean

Dim Adverti{*filter*}ts As SWbemObjectSet
Dim Adverti{*filter*}t As SWbemObject

Try

Adverti{*filter*}ts = Server.ExecQuery("Select ProgramName From
SMS_Program Where ProgramName='" & Name & "' And PackageID='" & PackageID &
"'")

Dim Exception As Exception

For Each Adverti{*filter*}t In Adverti{*filter*}ts
RaiseEvent SMSQMError("A SMS Adverti{*filter*}t with the
specified name already exists!", Exception)
Adverti{*filter*}ts = Nothing
Adverti{*filter*}t = Nothing
Exit Function
Next

Catch ex As Exception

RaiseEvent SMSQMError("Unable to check if a SMS Adverti{*filter*}t
with the specified name already exists!", ex)
Adverti{*filter*}ts = Nothing
Adverti{*filter*}t = Nothing
Exit Function

End Try



Return to Microsoft Systems Management Server

 

Who is online

Users browsing this forum: No registered users and 80 guest