Sitemap

Amicuk Programming Answers

Looking for Help - DCM Item to check if Computer Rebooted within 7 days

2015-10-11   Views:0

Advertisement

Hi, I would like to use DCM to tell me if computers have rebooted within 7 days.  I would like to audit compliance for this reboot status.  I would like to target my Windows servers (14K of them) to tell me if they have rebooted recently.  Is there a

Hi,
I would like to use DCM to tell me if computers have rebooted within 7 days.  I would like to audit compliance for this reboot status. 
I would like to target my Windows servers (14K of them) to tell me if they have rebooted recently.  Is there a way to do this in SCCM using DCM?
I've been looking at WQL query and think the LASTBOOTUPTime is a good place to check for the (well) last boot time.  But I am having trouble figuring out how to evaluate 7 days and use DCM to report on this for compliance.
Does anyone have any ideas...
Note: I have seen post on how to do this using hardware inventory data - but this is too slow for me as our hardware inventory SCCm client schedule is set to 2 weeks for servers.

The replay answer
Advertisement
Thanks for the script, we are using to see which system haven't rebooted on 35 days.
We had a few false non-compliant results based on the computer regional settings. 
I updated your script to and changed it look at days rather than hours.
strComputer = "."
 Set objWMIService = GetObject _
     ("winmgmts:\\" & strComputer & "\root\cimv2")
 Set colOperatingSystems = objWMIService.ExecQuery _
     ("Select * from Win32_OperatingSystem")
 For Each objOS in colOperatingSystems
     'dtmBootup = objOS.LastBootUpTime
     dtmLastBootupTime = WMIDateStringToDate(objOS.LastBootUpTime)
  txtLocalDateTime = WMIDateStringToDate(objOS.LocalDateTime)
     'dtmSystemUptime = DateDiff("h", dtmLastBootUpTime, Now)
  dtmSystemUptime = DateDiff ("d", dtmLastBootupTime, txtLocalDateTime)
     'Wscript.Echo "time since last reboot " & dtmSystemUptime
 Next
 Function WMIDateStringToDate(dtmBootup)
     WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & _
          Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) _
          & " " & Mid (dtmBootup, 9, 2) & ":" & _
          Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup, _
          13, 2))
 End Function
 'dtmsystemuptime is hours since last reboot.  840 hours is 35 days.
 'changed to days
 if dtmSystemUptime < 35 then
 Result = "Good"
 wscript.echo Result
 Else
 Result = "Bad"
 wscript.echo Result
 End if

Go to See the other 6 answers

Looking for Help - DCM Item to check if Computer Rebooted within 7 days

Category:DefaultRelease time:2015-10-11Views:130

Hi, I would like to use DCM to tell me if computers have rebooted within 7 days.  I would like to audit compliance for this reboot status.  I would like to target my Windows servers (14K of them) to tell me if they have rebooted recently.  Is there a[More]

Item Partners Check box in Sales Order

Category:DefaultRelease time:2015-10-11Views:130

Hi all, What is the functionality and configuration settings of Item Partners Check box in sales order, partner function tab line item level? When i find the check box marking then it allows me changes by double clicking of the partner and changing t[More]

In MIGO quantity & Item OK check box should be supressed for 543 movement

Category:DefaultRelease time:2015-10-11Views:130

Dear all, I am doing Subcontracting goods receipt. when the item OK check box for the PO item with movement type 101 is checked, it automatically applied for the line items with movement type 543. But the quantity & Item OK check box can be edited fo[More]

Problem in Commitment line items & Budget check

Category:DefaultRelease time:2015-10-11Views:130

Hi Experts, I am facing a problem in my system for Commitment line items & budget check. I followed the below steps: 1. Created Project & structured the same. 2. Allocated the Budjet for WBS Elements. 3. Released the project. 4. The PRs are create[More]

Open Item Management Check box for GL Account

Category:DefaultRelease time:2015-10-11Views:130

Hi, I need to activate Open Item Management check box for one GL Account. But it is not accepting since few postings were there in that GL Account. Kindly help me how to activate Open Item Management Check box for GL Account. Thanks KB Moderator: Ple[More]

Unable to skip Item Availability Check form

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am trying to skip the Item Availability Check dialog (FormTypeEx = "65050") which comes up in Sales Order if an item's available quantity is less than ordered quantity. I know I won't be able to completely skip it since it's a system UI fo[More]

Sales Order - Item Availability Check

Category:DefaultRelease time:-0001-11-30Views:130

Hi All, Currently I am doing some integration work between SAP B1 and another ERP system.  The inventory data is maintained in the other ERP system and not in SAP B1. When I create a Sales Order in SAP B1, I need to replace SAP B1's default Item Avai[More]

How to ignore credit amounts in oldest item credit check

Category:DefaultRelease time:-0001-11-30Views:130

Hi, We've had an order that got put on hold because of the oldest item credit check.  The item is older than 15 days (our configuration setting), but the item is a credit memo, not an invoice.  Is there anyone to change this credit check so it will o[More]

Item Availabilty Check

Category:DefaultRelease time:-0001-11-30Views:130

Hi Guys I am having a issue with the item availability check that gets triggered in the sales order, if you use the "Copy To" Functionality from Sales Quotation to Sales Order then the check doesn't get triggered, is there a way of triggering th[More]

Diff between Item Amount Check and Stochastic Block

Category:DefaultRelease time:-0001-11-30Views:130

Hi, what's the diff between Item Amount Check and Stochastic Block in LIV??Item Amount Check The system calculates the sum of the value invoiced so far for the order item and the value of the current invoice and compares it with the value limit of th[More]

Automatic Item availability check on Sales Order

Category:DefaultRelease time:-0001-11-30Views:130

Hi, We use SAP B1 9.0 PL 08 HF1 I have two questions: 1. When Automatic availability check is activated on Sales Order in Document Settings, there will pop-up a windows for each sales order line which cannot be delivered. My question is, since we cou[More]

Hot
Hi All, I am really frustrated, last night my phone decied to turn itself off and on again and when i looked at my messages they had all disappeared. :-( So i took someones advice this morning and clicked restore, i was told this would restore all th [More]
When converting exchange rates xml from http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml I'm getting problem with xmlns in root element. CALL TRANSFORMATION triggers CX_XSLT_ABAP_CALL_ERROR, but only if there is xmlns attribute in first l [More]
Hi,       I have a screen which is of dialog-box type. This dialog screen shows an ALV and has a button in the ALV toolbar. On pressing this button, a pop-up screen is to be displayed. This pop-up screen is designed as a selection-screen. Is it possi [More]
helo experts can u please explain what are the different function modules that are used in alv reports and what is the exact use of each and every function module?Hi, Well everybody gives good explanation to you. The commonly used ALV functions used [More]
Folks, I have my HDTV hooked up as a secondary monitor. In Leopard it works great. But, if I switch to XP using BootCamp (one of my internet video providers specifies XP & IE for its service) the system sees the second monitor; all settings seem corr [More]
Hi , I would like to know how to restrict authorization group FCAR and FCAP.We could see it is related to F_BKPF_BES object .It seems the same authorization object should be given the following access --display access for documents asigned to authori [More]
Hello, I have a BIG problem. I want to use IDOC - XI - IDOC. I have configured the connections. But when I send the Idoc to the XI. it returns a code in the SM58 "IDoc adapter inbound channel: Error Fehler beim Le" The Message comes cut, it does [More]
Is there a way to add an hyperlink in InCopy CS2?Thanks a lot! I've been trying to do it backwards from that -- pasting the link into the Add Hyperlink Dialogue Box, and then trying to change the it there or after it's pasted. This will relieve my fr [More]
I finish installed the new FW 20 all went smooth after I finish few things s top working: Maps not working it start show the map and crash (back to the main screen). I total remove it and installed it again; I reload the latest maps as well but still [More]
Hi All, I need to create a stock holding report usin ALV for inventory,can any one tell me what is the standard report and how to create this report,what are the tables and all. Thanks.Hi Mohammed, Please refer the below thread(s), stock report Best [More]