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, somebody nkow what is the error? I have this simple session bean deploy in a jboss 4.0.5 GA application server My interface: package server.ejb.usuarios; import javax.ejb.Remote; @Remote public interface Prueba {      public void getError() throw [More]
Adobe reader XI hangs when I am connected to a sonicwall VPN connection. Note that I am not opening the reader on the remote desktop. I am doing it on my Home PC. However, if I disable my sonicwall connection, then the adobe reader opens instantly. E [More]
Hi All, Just of curiosity and branding I want to put my company's logo instead of Oracle in Apps Homepage. Can anyone help me on this? Thanks, AnchorageYou are running adfmcctl.sh version 115.19 Cannot reconnect to gateway Cause: Application Object L [More]
I have downloaded Jdeveloper from internet and saw many demos on internet on how to use it. I want to develop application using Jdeveloper and deploy on the server, but i think before this I need to buy this. Can anyone clarify me, what I should do? [More]
I am searching for documentation for Best Practices Package for Chemical Industry e.g. file SMB18_XK15_O002_Q36_01.TXT but could not find it on SAP Marketplace. Can someone hint me where i can get those files.Yogesh, I suspect that the exact file you [More]
Hi All, I am getting these errors daily in oracle alert logs. ORA-03137: TTC protocol internal error : [12333] [4] [195] [56] [] [] [] [] Sun Aug 14 14:07:12 2011 ORA-03137: TTC protocol internal error : [12333] [4] [195] [47] [] [] [] [] Sun Aug 14 [More]
I am currently running Windows XP Pro on a Matrox Axio system in which the CS3 Creative Suite was already installed for me upon purchase. As of late I've had problems with Quicktime (Premiere and After Effects no longer see it as a compatible format) [More]
Hello, I just have a question about the 'Gather Schema Statistics' concurrent request. We run this every evening on ALL schemas, however our SYS and SYSTEM schemas aren't registered in the application so therefore stats aren't gathered for these. Sho [More]
Can someone comment or verify if there is a problem with the New Retina Macbook pro 15 Haswell system screen?  Something concerning a yellow screen.  Is this a problem?Before you get too deeply into screen switching, you might take a look at what's p [More]
Hi all, I receive this error when calling a PDF report from APEX 11g. In XE 10g this was working fine. PDF is not generated with an error in Acrobat Reader 6 and 9. 09/07/06 02:59:32.571 fop: JspServlet: unable to dispatch to requested page: Exceptio [More]