How powershell/vbscript works in the validation section, settings of a configuration item

Hi,
I have been searching for an example on how a Powershell script or VBScript works in the configuration item settings part of a configuration item, I want to use a script to validate if a particular log file is older than three days or not, if it is older
than three days I would say it non compliant otherwise complaint. I would like to see the compliance reports are generated on basis of this condition. please help how can I achieve it. thanks!

Just output a value to stdout from the script (using Write-Host in PowerShell or WScript.Echo in VBScript) and check for that value on the Compliance Rules tab of the Compliance Item. Check out the examples at
http://sccmguru.wordpress.com/2014/08/12/configuration-manager-2012-compliance-baseline-to-disable-paint-net-automatic-updates/.
Jason | http://blog.configmgrftw.com | @jasonsandys

Similar Messages

  • HT201272 If I go through "Purchased", how will it work for the ones I completed my album & single is no longer available?

    Over the years, I've purchased 425 albums (2312 songs total).
    I'm upgrading my hard drive, and was wondering how it worked for the 'Purchased' section. If I bought an album with "Complete My Album" and the 'Single' I got in pre-orders (or whatever) is no longer available for purchase, will I get it with my entire album download? Or will I have to go back & re-purchase that song? (considering I notice if the song is missing at all)
    (If my rambling makes any sense) Does anyone know? or is this something I should ask Customer Support?

    Go into iTunes store on computer. On the right hand side under quicklinks select Purchased. You can redownload any of those songs for free as long as you have authorized your computer. Just click the little cloud, or "download all"

  • HT1918 How do I get to the edit section

    It says go to the apple ID field in the edit section...how do i get to the edit section?

    Would it be in the settings section

  • How Delta mechanism works for the datasource 0CRM_SALES_ACT_1 in CRM .

    Hi all,
    How Delta mechanism works for the datasource 0CRM_SALES_ACT_1 in CRM .
    I mean timestamp, date etc? And how I can check that
    Appreciate u r response.
    Thanks
    Pramod

    Hi,
    in your system, goto rsa1->tools->assign source system id....
    regards
    Siggi
    PS: I strongly recommend to use the search functionality. This has been asked already a few times.

  • My iPad 2 started to backup iCloud and its now locked up. How do i unlock it, the button for settings and close are not working. What can I do?

    my iPad 2 started to backup iCloud and its now locked up. How do i unlock it, the button for settings and close are not working. What can I do?

    Try this.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • How to get SYSDATE in the header section dynamically when we run the report

    I have one more issue may i know how can i get the sysdate in the header section when i run the report.
    as we have the requirement like this
    In the header section
    Run Date : ("sysdate").
    How to get the sysdate dynamically in the RTF template, when i go across the google i found that header and footer section did not allow form fiields .
    So is there any way to do it.
    Thanks in Advance.
    Have a Nice Day.

    You cannot insert form fields in the Header section, but you can just insert the code to achieve this. For example: insert this in the header section to view the sysdate: You could format the date as you would like..
    <?xdoxslt: sysdate(‘YYYY-MM-DD’)?>
    Since you are new to BI publisher, search the forum, review the Report Designer's guide for BI publisher. You will find that most of your basic questions are answered there and there are examples as well.
    Thanks!

  • How do you work out the number of days difference between two dates?

    I'm running Crystal v12.
    We use a date field in our SQL database that we use to store the client's year end date.
    As the year end date (date and month) doesn't change for a client, the year end date field in all of our reports is set to just show the DD/MM part. Over the years as new clients are set up we just enter the date and month - the year part is irrelevant although as in all date fields the year is automatically entered.
    Doing it this way means that we don't have to adjust the year end year part each year. We just use the DD/MM part.
    I need to create a formula that works out the number of days there have been (i.e. the difference) from the current date to the year end date. It MUST EXCLUDE the year however.
    For example:
    Year End Date = 30/04/03
    Current Date = 25/05/10
    Days Difference (EXCLUDING year) = 25
    Days Difference (including year) = 2582
    Year End Date = 31/03/09
    Current Date = 25/05/09
    Days Difference (EXCLUDING year) = 55
    Days Difference (including year) = 420
    If you include the year part then working out day difference is simply a case of creating a formula that subtracts the year end date from the current date (CurrentDate - {tblClient.YearEnd}.
    HOWEVER I need to exclude the year part.
    Can anyone tell me the formula or best way to do this?
    Thanks in advance.
    Edited by: BadBoy House on May 25, 2010 3:15 PM
    Edited by: BadBoy House on May 25, 2010 3:15 PM

    Hi
    You can try this
    datevar e := date(year(currentdate),month({tblClient.YearEnd}),day({tblClient.YearEnd}));
    numbervar num_days := datediff("d",currentdate,e)
    Create a datevar called e that uses the original month and day numbers for {tblClient.YearEnd} but uses the year of the current date
    Then just datediff on e to get the number of days between the two dates
    I hope i understand your problem and that this helps
    Best regards
    Patrick

  • How do I get to the rules section in iCloud mail on my iPad. I want to block just one email sender.w do I post

    How dom I get to the rules box in iCloud mail on my iPad. I just want to block one address.  Thanks

    The replies have helped me to conclude that in this instance apple have failed by a long shot to provide any reliable help.  I have exchanged chats with them and been told to just read variuos support notes which explain how to set the rules on an iPad.  After many exchanges I was not convinced they had grasped the real problem.  In the end they would appear to be wrong in the advice given.  Apple were no help at all, I gave your replies a HELP star because they helped me conclude that.
    The situation was and still is, the iPad was a gift to an 85 year old relative of mine, she loved it, really getting used to emails, photos,, web and so on.  Suddenly things started to go wrong, photos started failing freezing up during uploads and albums sharing etc.  in the end had to dump everything and with help call on Dropbox, all well now with that. Then an email from one of her eldly friends was delivered every 10 minutes, over 400 panic.  Nobody  gave any simple answer to her of the sender to stop the emails.  She called me, 500 miles away to see if I could help, yep I said until you get someone close to help you just block that email address, easy or so I thought, you know the trauma from there.
    I got the roundabout way to stop them with my own winbox and iPad., she as just got the iPad and is housebound.  I have offered that if she gives me her security info I'l  log into her iCloud mail in windows and set the rules and any other preferences for her.....highly desirable solution isn't it.
    I,ll say to anyone that apple and many of it apps are not user friendly and fail badly.  Sorry for being a bit longwiinded in this reply but it's given me some experience with this facility that again was not easy to master.

  • How can I work through the limitations of the Premiere Elements 9 trial?

    Adobe has a number of suggestions for working with the trial download of Premiere Elements 9.
    http://kb2.adobe.com/cps/870/cpsid_87080.html

    yogawithlexi,
    Welcome to the forum.
    Im also needing to just edit the photos but adding text. Nothing fancy. I just want to make some flyers.
    For editing photos, to be output to the printed page (whether by a commercial printing service, or a desktop printer), I strongly recommend Photoshop Elements (PsE).
    If you need to output to a video file, then Premiere Elements (PrE) can possibly do what you want, but not for the printed page - at least not easily, and with the ultimate results. First, Video is not dependent on DPI/LPI (Dots Per Inch, or Lines Per Inch), where printed material will be. Also, while PrE can output a Still Image, the quality, when printed, will be far less, than what one can obtain with PsE.
    Do you currently have Photoshop Elements on your computer, or only Premiere Elements?
    Good luck,
    Hunt

  • How does it work with the iphone

    i bought a time capsule but i don't know how to use it with the iphone, ipod, or ipad.  can you please tell me the uses for those devices and how to use them?

    TC has no direct relevance to any of the iOS devices..
    They backup to iTunes on the computer, which is then backed up by Time Machine to the Time Capsule.
    You can access files if you load an app like file browser.. but TC is not a media server .. it is a dumb hard disk and other than saving files there is nothing useful to do with the TC.

  • Is it possible to pre-configure the iPad keyboard settings using Apple Configurator or iPhone Configuration Utilitity?

    I have to configure 20+ iPads for events that are sometimes in French, sometimes in English, sometimes both. It is important that I can preset the keyboard settings to allow multiple languages (for example). I've been looking in Apple Configurator and iPhone Configuration Utility, and I can't find where I can set that kind of settings during deployment.
    Is there a way I can manage all the settings of the iPads without having to go through each iPad to make sure the settings are ok for my event?

    Order Management provides you with the ability to import ATO and PTO configurations from legacy systems or EDI. In your case, you should define the ATO/PTO model first and then import the order and configuration selections from the EDI.
    The order import will let you create an Order even if the selections are invalid.
    You should then programmatic book and progress the order (using Order actions api).
    If the configuration is valid, then the API will generate a * number (ATO item), create bom/routing as appropriate and place that item on the sales order.
    If the configuration is invalid, it won't let you book the order. Once you have fixed the invalid selections/configurations, you will be able to book and progress the order.
    See http://download.oracle.com/docs/cd/A89549_01/acrobat/115omapi.pdf for details.
    Also refer to the "Importing Configurations" section in Oracle Order Management Suite White Papers [ID 113492.1]
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • OnClick not working in the validation page

    Hi All,
    In my jsp i used onClcik for radio buttons. if i click the radio button this hide some fields and show some fields based on the radio button. For this Jsp Page
    i did validation in my action(Struts1.1) using ActionMessages class.I can choose the radio button. That time onclick working properly. then after when i click submit (that time i did validation. For example check the field is empty or not) if error occurs, then it redirects the same page. That page doesn't hide the fields based on the radio button. so again i need to click the radio button. My question is, Is this possible to show the fields based on the radio button(without click again radio button) when it redirects the same page (Validation is here)?
    please assist me .
    Thanks in advance.
    Regards
    Lakshmi

    Hi,
    According to your description, my understanding is that you want to add button in a calculated field to call custom JavaScript function.
    I suggest you can use concatenate formula function to achieve it.
    You can add button use concatenate function like below:
    =CONCATENATE("<input type='button' name='btnAddToBasket' id='btnAddToBasket' value='Add to basket' onclick=","addToBasket('",[Document Name],"','",[Original],"')"," />")
    More information:
    How can I get a button in SharePoint to display info about a record?
    CONCATENATE function
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to handle in LSMW the validation if 01 and 35 for two values

    in lsmw if we are having in flat file as 01 one entry and other 34.
    size of the field is only two character .
    As of now iam checking to put 0 before one if the value 01 however iam
    getting problem in the case of 34
    case 1 ) if iam having 01 the below code works perfectly
    Concatenate '0' flat_0034  into flat_0034.
    case 2) if iam haivng in the flat file as 35 the code
    concatenate '0' flat_0034  into flat_0034 going into wrong
    as in front of the value
    could any one please let me know how to handle this scenario.
    regards
    syamla

    Dear Naresh Nelapatla 
                   Can you please give me validation example please as it is little urgent.
    thanks &regards
    syamla

  • How do I edit/delete the same section of multiple tracks?

    Basically I'm doing a podcast with multiple voice tracks. Once I sync and line everything up, I still have sections of audio I want to take out. But obviously with the tracks synced, I need to delete it from all of them at once and have the audio "snap" back in place. How do I accomplish this?

    Enable the "Arrangement Track" and define arrangement regions. Then you can delete and move regions across all tracks at once.
    See: Edit Arrangement Regions
    Regards
    Léonie

  • How can i work out the GMT time wherever i am ?

    Hi, i'm going crazy with the date/time classes, just can't seem to work it out.
    I need to know the current time as a GMT time.
    I need to know wherever the program is running, i myself am in Amsterdam GMT+02:00 , my server is located in Canada GMT-04:00 (?)
    I parse dates from websites all over the world so i get times in the form of strings of which i know the timezone. I need to store everything in a mysql database and i want the database to contain GMT times only.
    I've worked out how to get a string from its timezone into GMT but,
    how can i get the current time as GMT ?
    somehow i keep getting timeshifts i cannot explain.
    this is where i got to:
    TimeZone tz_gmt;
    tz_gmt = TimeZone.getTimeZone("GMT");
    SimpleDateFormat sdformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    sdformat.setTimeZone(tz_gmt);
    Timestamp tsGmtnow;
    tsGmtnow = Timestamp.valueOf(sdformat.format(new Date()));
    Which is fine if i run it in Amsterdam, it gives me the current date/time in GMT, but on the server in Canada it gives me GMT+4 hours. What am i missing ?

    found a workaround,
         TimeZone tz_gmt;
         tz_gmt = TimeZone.getTimeZone("GMT");
         TimeZone tz_can;
         tz_can = TimeZone.getTimeZone("GMT-04:00");
         TimeZone tz = TimeZone.getDefault();
         String Stz = tz.getID();
         SimpleDateFormat sdformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Timestamp tsGmtnow;
    if ( "Europe/Berlin".compareTo(Stz) == 0) {
         // i'm in Europe, go from local time to GMT
         sdformat.setTimeZone(tz_gmt);
         tsGmtnow = Timestamp.valueOf(sdformat.format(new Date()));
    } else {
         // i'm in Canada, local time IS gmt
         sdformat.setTimeZone(tz_can);
         tsGmtnow = Timestamp.valueOf(sdformat.format(new Date()));
    out.println(tsGmtnow.toString());
    the default timezone returns either:
    Europe/Canada
    GMT-04:00
    somehow the GMT-04:00 get ignored by the formatter

Maybe you are looking for

  • I have an ipod touch 4th gen and my power botton is stuck is there anywhay to fix it???

    so i have a 4th gen ipod touch and my power botton got stuck. is there anyway to fix it besides sending it in or buying a new one????

  • Lost registration info

    I have a problem. In a recent move I have lost my FCP original disks (which isn't a huge problem since I have the software backed up) but when I copied all of my software from an old machine to my new MacBook Pro the FCP became unregistered and I can

  • Columns in tablecontrol getting wider with different gui patchlevel

    Hi, I'm using a tablecontrol in a dynpro that shows exactly 31 columns on the screen, if I'm using SAP GUI 6.20 Patchlevel 44. If I use SAP GUI Patchlevel 66 for this application the columns are wider, so that not all 31 columns can be seen and the s

  • Error numbering credit note of vendor

    the we try to unbloked the numbering of credit note send error Another user-modified table  "(NNM1) (ODBC- 2039)  [Message 131-183] we kill the process of the users not workin we restore the numbering not working we restore the data base not workin w

  • Weather application Runtime error - plz help......

    Hi All, I am trying to create an Weather application presented in blog "Create a weather magnet using xml feed from weather.com" by Prakash singh. It accpets XML feed (web service) from weather.com Everything works fine, when I deploy it into Portal.