none
Invalid argument format (index 7) "AND", arguments are supposed to start with a / (SoftwareUpdateAutomation.exe)

    Question

  • I’m a little confused with the syntax to be used after SoftwareUpdateAutomation.exe

     

    My scheduled task isn’t working, so I’m attempting to understand what’s actually happening.  When I run this command:

     

    C:\>"%ProgramFiles(x86)%\Microsoft Configuration Manager\AdminUI\bin\SoftwareUpdateAutomation.exe" /AssignmentName ForefrontUpdates /PackageName ForefrontDefinitions /RefreshDP /UpdateFilter "articleid=2461484 AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0"

    I get the following error:

    Error parsing command line argument

    Invalid argument format (index 7) "AND", arguments are supposed to start with a /

    Arguments:

    0: (/AssignmentName)

    1: (ForefrontUpdates)

    2: (/PackageName)

    3: (ForefrontDefinitions)

    4: (/RefreshDP)

    5: (/UpdateFilter)

    6: ("articleid=2461484)

    7: (AND)

    8: (IsSuperseded=0)

    9: (AND)

    10: (IsEnabled=1)

    11: (AND)

    12: (IsExpired=0)

    Usage: SoftwareUpdateAutomation.exe parameters

    Parameters:

    /Help: Get program usage

    /SiteServer: Site server computer name

    /UpdateFilter: Filter for selecting software updates that are used for the desti

    nation packages

    /AssignmentName: Name of destination software update assignment

    /PackageName: Name of destination software update packages

    /PreDownloadFolder: Destination folder holding downloaded update files

    /UpdateLanguages: List of language IDs for requested software updates

    /RefreshDP: Request automatic propagation of updated package to Distribution Points (true by default)

    My assignmentname and packagename variables match the work I did in the UI.

    The only guidance on this seems to be here:

    http://technet.microsoft.com/en-us/library/hh297450.aspx

    ·         Can someone provide a sample command that works?

    ·         Seems like quotes may be missing or otherwise in the wrong spots?

    ·         Also, what is the significance of “articleid=2461484”?  Does this need to be updated with a new number?



    Mike Crowley | MVP
    My Blog -- Planet Technologies

    Tuesday, July 26, 2011 7:48 PM

Answers

All replies

  • It indeed looks like a quote issue... Here are some samples an common issues: http://blogs.technet.com/b/clientsecurity/archive/2011/07/18/errors-when-using-the-fep-2010-definition-update-automation-tool.aspx

    The ArticleID will always be the same for FEP Updates, it's the general Article for Definition updates.


    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    Wednesday, July 27, 2011 5:51 AM
  • Thanks for you input and clearing the subject up on the ArticleID.

    I've noticed in the blog link "/RefreshDP" is missing from their example.

    I also heard from a friend that the technet article didn't include the anything beyond this in the initial revision:

    SoftwareUpdateAutomation.exe" /AssignmentName "ForefrontUpdates" /PackageName "ForefrontDefinitions" /RefreshDP

    (Note the absense of the UpdateFilter switch and beyond)

    I tried this version and it completed successfully; however I worry I'm missing something if I leave it this way.

    Seems like this tool could be used in a few different ways and the FEP group isn't consistent with their recommendations. :(

    You also mention an issue with the placement of my quotes.  They seem to match the blog's example, so can you point out where you'd suggest a change?



    Mike Crowley | MVP
    My Blog -- Planet Technologies



    Wednesday, July 27, 2011 1:00 PM
  • Well.. the tool was meant to be run by only adding the /AssignmentName and /PackageName, but then they figured out that the package didn't get updated on the DP and that the tool would just fail because there where two updates.. That's why they wrote the article mentioned before...

    About the quotes, they should be fine, but I've seen situation where also single quotes arround the article id where needed, like this /UpdateFilter "ArticleID='2461484' AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0"


    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    Wednesday, July 27, 2011 6:40 PM
  •  

    Thanks Peter for that comment. I've done two deployments in the last week or so; one worked fine without the single quotes the other required them.

     

    It appears the only thing that is not selected by the default /UpdateFilter is the IsExpired option.

     

    I had a followup question... From a Deployment Management perspective, should I see these updates being "advertised" to the collection specified in the Deployment Template after the script is run? I can see that the updates get added to the Deployment Package and that the distribution points do indeed get updated. However, I see nothing listed under Deployment Management.

     

    Checking the log file, I get the following after the script runs. I've googled a little bit and this thread (http://blogs.msdn.com/b/minfangl/archive/2011/07/21/fep-2010-definition-update-automation-tools-issues-workarounds-and-best-practice.aspx) seems to point to the presence of too many "active" updates within the deployment package, would that be correct? Another wrinkle; if I check the Software Updates listing inside of the Deployment Package it would appear that my clients are in fact getting the update as the "installed" column continues to increase despite the lack of an entry inside of the Deployment Management section.

     

     

     

    SoftwareUpdateAutomation.exe Information: 0 : SoftwareUpdateAutomation started... Version:2.1.1116.0
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.5986438Z
    
    SmsAdminUISnapIn Information: 0 : Configuration: SiteServerName: SCCM; SoftwareUpdateFilter: articleid=2461484 AND issuperseded=0 AND isenabled=1 AND isexpired=0; PackageName: MS FEP Definition Updates; UpdateLanguages: 0; SoftwareUpdateFolder: ; RefreshDistributionPoints: True; LogFile: C:\ProgramData\SoftwareUpdateAutomation.log. UpdateAssignmentName: MS FEP Definition Updates
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.6142678Z
    
    SmsAdminUISnapIn Information: 1 : Executing WQL: 'SELECT * FROM SMS_Site WHERE ReportingSiteCode = '''
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.6923878Z
    
    SmsAdminUISnapIn Information: 1 : ResultObject: 'bea2f088-7d58-4881-a029-2cde5e99e0e3'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7080118Z
    
    SmsAdminUISnapIn Information: 1 : Found site system 'REM'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7861318Z
    
    SmsAdminUISnapIn Information: 1 : __RELPATH: 'SMS_Site.SiteCode="REM"'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7861318Z
    
    SmsAdminUISnapIn Information: 1 : 
    
    instance of SMS_Site
    
    {
    
    	BuildNumber = 6487;
    
    	InstallDir = "C:\\Program Files (x86)\\Microsoft Configuration Manager";
    
    	ReportingSiteCode = "";
    
    	RequestedStatus = 1;
    
    	ServerName = "SCCM";
    
    	SiteCode = "REM";
    
    	SiteName = "Removed";
    
    	Status = 1;
    
    	TimeZoneInfo = "00000168 0000 000B 0000 0001 0002 0000 0000 0000 00000000 0000 0003 0000 0002 0002 0000 0000 0000 FFFFFFC4";
    
    	Type = 2;
    
    	Version = "4.00.6487.2000";
    
    };
    
    
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7861318Z
    
    SmsAdminUISnapIn Information: 1 : Executing static method SMS_Identification.GetProviderVersion()
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7861318Z
    
    SmsAdminUISnapIn Information: 1 : No method parameters specified
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.7861318Z
    
    SmsAdminUISnapIn Information: 1 : 
    
    instance of __PARAMETERS
    
    {
    
    	ReturnValue = 0;
    
    	VersionString = "4.00.6487.2157";
    
    };
    
    
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8017558Z
    
    SmsAdminUISnapIn Information: 1 : Executing static method SMS_SiteControlFile.GetSessionHandle()
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8017558Z
    
    SmsAdminUISnapIn Information: 1 : No method parameters specified
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8017558Z
    
    SmsAdminUISnapIn Information: 1 : 
    
    instance of __PARAMETERS
    
    {
    
    	ReturnValue = 0;
    
    	SessionHandle = "{248a3529-fa99-4fda-9e6d-0712f0bb63d2}";
    
    };
    
    
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8173798Z
    
    SmsAdminUISnapIn Information: 1 : SCF session handle {248a3529-fa99-4fda-9e6d-0712f0bb63d2} successfully aquired
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8330038Z
    
    SmsAdminUISnapIn Information: 1 : Executing static method SMS_SiteControlFile.RefreshScf()
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8330038Z
    
    SmsAdminUISnapIn Information: 1 : Setting parameter 'SiteCode', type 'String' to 'REM'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8330038Z
    
    SmsAdminUISnapIn Information: 1 : 
    
    instance of __PARAMETERS
    
    {
    
    	ReturnValue = 0;
    
    };
    
    
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8798758Z
    
    SmsAdminUISnapIn Information: 1 : Refresh of SCF successful
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8798758Z
    
    SmsAdminUISnapIn Information: 1 : Initializer '{3F32691E-24B1-4b1e-9915-37B633F39392}', will no be run, unsupported application type
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8798758Z
    
    SmsAdminUISnapIn Information: 1 : Executing WQL: 'SELECT * FROM SMS_SoftwareUpdate WHERE articleid=2461484 AND issuperseded=0 AND isenabled=1 AND isexpired=0'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8954998Z
    
    SmsAdminUISnapIn Information: 1 : ResultObject: '810c3766-b309-4efb-9824-7d41b562af87'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:46.8954998Z
    
    SmsAdminUISnapIn Information: 0 : SMS_SoftwareUpdate: CI_ID: 37070; ArticleID: 2461484; DisplayName: Definition Update for Microsoft Forefront Endpoint Protection 2010 - KB2461484 (Definition 1.109.494.0)
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.4267158Z
    
    SmsAdminUISnapIn Information: 1 : Executing WQL: 'SELECT * FROM SMS_SoftwareUpdatesPackage WHERE Name='MS FEP Definition Updates''
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.4267158Z
    
    SmsAdminUISnapIn Information: 1 : ResultObject: '6fccb186-304a-4285-99d8-7c3c719cc51b'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.4423398Z
    
    SmsAdminUISnapIn Information: 0 : SMS_SoftwareUpdatesPackage: PackageID: REM0005D; Name: MS FEP Definition Updates; 
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.5048358Z
    
    SmsAdminUISnapIn Information: 1 : Executing WQL: 'SELECT * FROM SMS_UpdatesAssignment WHERE AssignmentName='MS FEP Definition Updates''
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.5048358Z
    
    SmsAdminUISnapIn Information: 1 : ResultObject: 'eac38243-46b2-405f-8b28-dc701cdf6ae6'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.5048358Z
    
    SmsAdminUISnapIn Information: 1 : Executing static method SMS_SiteControlFile.ReleaseSessionHandle()
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.5829558Z
    
    SmsAdminUISnapIn Information: 1 : Setting parameter 'SessionHandle', type 'String' to '{248a3529-fa99-4fda-9e6d-0712f0bb63d2}'
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.5985798Z
    
    SmsAdminUISnapIn Information: 1 : 
    
    instance of __PARAMETERS
    
    {
    
    	ReturnValue = 0;
    
    };
    
    
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.6142038Z
    
    SmsAdminUISnapIn Information: 1 : SCF session handle {248a3529-fa99-4fda-9e6d-0712f0bb63d2} has successfully released
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.6142038Z
    
    SmsAdminUISnapIn Error: 1 : Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.
    
       at Microsoft.Forefront.EndpointProtection.SoftwareUpdateAutomation.SoftwareUpdater.Update(SoftwareUpdateAutomationArguments arguments)
    
       at Microsoft.Forefront.EndpointProtection.SoftwareUpdateAutomation.SoftwareUpdater.Main(String[] args)
    
        ProcessId=53648
    
        DateTime=2011-07-28T15:49:47.6298278Z

     

     


    Thursday, July 28, 2011 4:27 PM
  • Another wrinkle; if I check the Software Updates listing inside of the Deployment Package it would appear that my clients are in fact getting the update as the "installed" column continues to increase despite the lack of an entry inside of the Deployment Management section.

    SmsAdminUISnapIn Error: 1 : Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.

    I quoted two pieces from your comment and putting them together you get an exact match to issue 3 from the link you provided. The Deployment doesn't contain any updates and that's why the tool fails and because the tool fails at that point it can't add updates to the Deployment. So your in a circle :-)

    Just add an update manualy to the Deployment and you should be fine for the next time.


    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    Thursday, July 28, 2011 6:10 PM
  • Hm, but according to the image linked below there are updates inside of that package.

     

    https://lh5.googleusercontent.com/-F-SlVkndsWs/TjGm635wJ_I/AAAAAAAAAqo/fD2vWQR5-1w/s1440/SusUpdatesFEP.jpg

     

    Thursday, July 28, 2011 6:14 PM
  • Yes, but there is a difference between your Package and your Deployment. The package contains the updates and puts them on the Distribution Point and the Deployment tell the clients that the updates are available. See also: http://technet.microsoft.com/en-us/library/bb680906.aspx (Software Update Deployments) and http://technet.microsoft.com/en-us/library/bb693754.aspx (Software Update Packages)
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    Thursday, July 28, 2011 6:44 PM
  • Ahhh! Thank you that makes sense now! Ran a deployment and placed an update into the deployment and then the script runs normal after the fact... Thank you very much for explaining that.

     

    As an aside, I believe I may know why Mike's original error occurred. It appears if you copy and paste directly from the technet article the quotes ("") around the /UpdateFilter section are not really quotes... See the following images:

    Original:

    https://lh4.googleusercontent.com/-LZkBSj0uRcg/TjGzAq00jiI/AAAAAAAAAq0/ohL5N237iXY/SUPFEPAutoBefore.jpg

     

    Changed:

    https://lh4.googleusercontent.com/-xQikxIz-__I/TjGzAo9ogFI/AAAAAAAAAq4/UtTgAP-exkQ/SUPFEPAutoAfter.jpg

    If you remove both quotes and manually enter them the command executes normally.

    Thursday, July 28, 2011 7:08 PM
  • As an aside, I believe I may know why Mike's original error occurred. It appears if you copy and paste directly from the technet article the quotes ("") around the /UpdateFilter section are not really quotes...


    Good one! That indeed happens a lot with copy-and-paste... :)
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude
    Thursday, July 28, 2011 7:15 PM
  • Bingo!  I've also left a note with the forefront team to have this documentation bug fixed.  Thanks Gents!

     

    EDIT:

    FWIW, it seems the issue wasn't with bad cut/paste.  The technet author probably composed the document in word, which corrected the tilt of the quote.  When the author put it back, they didn't catch this.


    Mike Crowley | MVP
    My Blog -- Planet Technologies


    Thursday, July 28, 2011 7:33 PM