Re: Scripting SMS 2003

Tech-Archive recommends: Speed Up your PC by fixing your registry



Paul,

Thanks! This would be helpful although I found another solution to my problem.

I did a loop querying SMS_CLI_SysResUse (my code from first post) with an
interval of 1 minute for a total of 60 minutes. If query returns an empty
recordset I trap the error and continue the loop, when query returns the site
I'm interested in and the RoleName 'SMS Management Point' I know it is
properly registered and can continue the script. If the site isn't registered
withing 60 minutes I log an error and halt the script.

Regards,
Peter Lundin



"Paul Thomsen [MSFT]" wrote:

> I use code like the following to get the SCF settings. So change
> filetype to the appropriate value (1, 2, whatever) to get proposed vs
> actual. Check with the SDK to verify what the proper values are for
> filetype.
>
> set SCFs=WbemServices.ExecQuery("Select * FROM SMS_SiteControlFile WHERE
> Sitecode='" & site.sitecode & "' AND FileType=1")
> For Each SCF in SCFs
> SCF.Refresh site.sitecode
> Next
> objpath="SMS_SCI_ClientConfig.ItemType='Client Configuration',Sitecode='" &
> Site.Sitecode & "',FileType=1,ItemName='Client Properties'"
> set comp=WbemServices.Get(objpath)
> PropArray = Comp.props...
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Peter Lundin" <PeterLundin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:C0B9141B-1787-4FA1-9A22-2BC93B0D4206@xxxxxxxxxxxxxxxx
> > Thanks for a quick response!
> >
> > We are rolling out 20 sites a night with a total of several hundred
> > secondary sites and servers. The installation and configuration of SMS2003
> > on
> > the servers is fully automated using VBscript for the most part.
> >
> > It is important that we get a reliable report when the nights batch is
> > done.
> > I was hoping to use the method I described before to get a report. But
> > with
> > that kind of delay it is nearly impossible to find a good starting point
> > for
> > the reporting script, especially since we don't know when the servers
> > started
> > the installation procedure.
> >
> > Is there a way to read the "proposed" settings to get an indication if
> > things went wrong or successfull?
> >
> >
> > "Paul Thomsen [MSFT]" wrote:
> >
> >> When you make a site change in the console, it takes some time to
> >> become
> >> effective as the various components kick in and do the work needed. If
> >> the
> >> change is down the hierarchy, that can take longer.
> >>
> >> To reflect this, there are various states for the site control file.
> >> I
> >> forget the formal terms, but they're things like "proposed", "applied",
> >> etc.
> >> This used to be really obvious in the SMS 1.2 console and you can see it
> >> in
> >> some of the logs, the site control inbox, or some of the data structures.
> >>
> >> The SMS 2.0 and 2003 consoles take an optimistic approach and show
> >> you
> >> the 'proposed' state of the component, so the console reflects your
> >> change
> >> right away, even though in reality the change hasn't happened yet and
> >> could
> >> conceivably fail. Your script is giving you the actual state. Since
> >> you're
> >> monitoring, presumably for success, that's actually a good thing. So I'd
> >> suggest you should keep your script as is.
> >>
> >> SMS is a big distributed system, and thus plenty of things don't
> >> happen
> >> in real time. That should be acceptable, since managing large numbers of
> >> computers rarely has to happen instantaneously (how important is it that
> >> you
> >> upgrade all your users to Office 2003 in the next 30 seconds, for
> >> example?).
> >> So I'd suggest it's reasonable to wait a bit before monitoring for
> >> success
> >> of site changes.
> >>
> >> --
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >> "Peter Lundin" <PeterLundin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:E4C2B4AD-F988-41BF-B4A3-F9AE8E877921@xxxxxxxxxxxxxxxx
> >> > Hi,
> >> > After installing a Secondary Site I want to verify that the role
> >> > 'Management
> >> > Point' is enabled.
> >> > To do this I'm querying the 'SMS_SCI_SysResUse' class (se code below).
> >> > The query does not return information that the role is enabled, even
> >> > though
> >> > I can see that it is in the SMS Admin Console, until after 1 to 20
> >> > minutes.
> >> >
> >> > Is this due to intra-site replication or something like that?
> >> > Is there any other way to verify that the role has been enabled without
> >> > the
> >> > delay of 1 to 20 minutes?
> >> >
> >> > ----------
> >> > SiteCode = "mySecSite"
> >> > CentralSiteCode = "myPriSite"
> >> > CentralSiteServer = "myPriServer"
> >> >
> >> > On error resume next
> >> >
> >> > Set loc = CreateObject("WbemScripting.SWbemLocator")
> >> > Set WbemServices = loc.ConnectServer( CentralSiteServer,
> >> > "root\SMS\site_"
> >> > &
> >> > CentralSiteCode )
> >> > Set objSiteRoles = WbemServices.ExecQuery("Select * From
> >> > SMS_SCI_SysResUse
> >> > WHERE SiteCode='" & SiteCode & "'")
> >> >
> >> >
> >> > For Each Role In objSiteRoles
> >> > <code>
> >> > Next
> >> > ----------
> >> >
> >> > Regards,
> >> > Peter Lundin
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: Return value of whenever sqlerror
    ... I am executing a unic script whihc in turn executes an Oracle stored ... I am failing the stored proc and using whenever sqlerror in the ... unix script to trap success. ... of my unix directory on failure and on success the PL/SQL procedure ...
    (comp.databases.oracle.server)
  • launching wish from tclsh
    ... console interface (tclsh) in place of a gui interface for input of test ... So, I proceeded creating a tcl script that, running from Tclsh, gets ... If I open a Tclsh console and I manually try to launch wish console ...
    (comp.lang.tcl)
  • Re: javaldx failed.
    ... mozilla start from default fails, ... error message. ... console in the icewm window but I resolved this for the console window ... get script ...
    (Debian-User)
  • Re: ping computer and remove from AD
    ... leave it alone or 2. ... Wscript.Echo "Success pinging " & strComputer ... Case 0 PingStatus = "Success" ... In your script, where you use the NetBIOS name of the computer, you would ...
    (microsoft.public.scripting.vbscript)
  • Re: Firefox ???
    ... Console, Error Console, Page Info, Clear Private Data, Flashgot and ... Can't see Network or Offline Storage Pane. ... it might just be that the coding for the router page is ... "A script on this page may be busy, ...
    (uk.people.silversurfers)