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
If our LaserJet Pro 400 color MFP(m475dw) sits overnight or for a good majority of the day without scanning to a network folder it will need to be rebooted before it will connect to the folder. I have tried adding a different folder and the same issu [More]
Hi All, In my application, iam using one table having 5rows , with checkboxes, based on one condition i want to  make few checkboxes as default disable in the same table, and some checkboxes i shud make it as enable, so experts please help me how to [More]
HI, is it posible to define output for debit memo like output for rduction invoice (vendor error)? the issue is that we want to use in standart Return to Vendor process and with invoice verification process to take out output with debit memo to the v [More]
Hi All, I've read several posts and could not find one that would resolve my issue. I get the partially successful on several switches. I understand that is because of LMS not being able to tftp vlan.dat back to server. I tried it directly on a switc [More]
Hi All, I am getting the duplicate records. I had select the check box "ignore duplicate records at infopackage level". still i am getting the duplicate records. is der any alternative solution. Plz help me Regards KKHi KK, First delete the cont [More]
I would like to transfer a file throught a tcp socket, here there is what the sender program does : try{      File localFile = new File("shared/"+fileName);      DataOutputStream oos = new DataOutputStream(socket.getOutputStream());           Da [More]
I need a BADI or USER EXIT for TX MIRO so that I could propose the quantities for order posotions before saving (on screen after filling the order). Thanks.Hi Pablo, Check the Enhancement Point SAPLMR1M_11 of Spot ES_SAPLMR1M inside the include LMR1M [More]
Safari worked fine until this past week.  My only thought is that it happened after the latest Microsoft Office software update. Is it connected?  Safari opens and 2 seconds later crashes.  Uses Firefox in the mean timeThere is no need to download an [More]
I am trying to update version 4.3.3 ipad with a canadian itunes account on a pc that is physically located in the united states. I am receiving the error message "the ipad software update server could not be contacted". Is location my problem?He [More]
Can anyone help? I've created an andriod app in flash and need it to exit when the user clicks the home button. I found the following actionscript 3 online // Check if we are on a Android / iPhoney device. if(Capabilities.cpuArchitecture=="ARM") [More]