Kevin -

I don't believe any of the information you want is stored directly in AD,
you would have to query the machine via remote WMI or look for it in SCCM
or other management tools.

On Fri, Dec 2, 2016 at 1:09 PM, It's Mike Mitchell <[email protected]> wrote:

>
>
> ------------------------------
>
> Some powershell fragments…
>
>
>
> Machine On line?
>
> test-connection $computername -erroraction silentlyContinue -count 1
>
>
>
> Last reboot…
>
> $LastBoot=[System.Management.ManagementDateTimeConverter]::ToDateTime((Get-WmiObject
> win32_operatingsystem -ComputerName $computername).lastbootuptime)
>
>
>
> Last logged in user… I’d consider examining the date stamps on
> $computename\C$\users\*\NTUSER.DAT and choosing the most recent one
>
>
>
>
>
> *From:* [email protected] [mailto:listsadmin@lists.
> myitforum.com] *On Behalf Of *Kevin Ray
> *Sent:* Friday, December 2, 2016 8:34 am
> *To:* [email protected]
> *Cc:* [email protected]
> *Subject:* [scripting] Re: powershell script to pull the machine last
> rebooted information from active directory
>
>
>
> But instead of sccm any way to get from AD using scripts
>
> On Friday, December 2, 2016, Daniel Ratliff <[email protected]> wrote:
>
> Sorry, v_r_system not v_r_system_valid. Only active machines show up in
> v_r_system_valid.
>
>
>
> *Daniel Ratliff*
>
> *Technology Architect *| *Client Innovation Solutions | Information
> Technology Infrastructure (ITI)*
>
> *T* 502.476.9976 <(502)%20476-9976> | [email protected]
>
>
>
> *From:* [email protected] [mailto:listsadmin@lists.
> myitforum.com] *On Behalf Of *Daniel Ratliff
> *Sent:* Friday, December 02, 2016 10:52 AM
> *To:* [email protected]; [email protected]
> *Subject:* RE: [mssms] powershell script to pull the machine last
> rebooted information from active directory
>
>
>
> LastBootUpTime is stored in win32_operatingsystem in WMI or
> v_gs_operating_system in SQL.
>
>
>
> Last Logged on User name, check these.
>
> http://www.enhansoft.com/blog/where-to-find-user-name-data-
> in-configuration-manager-part-1
>
> http://www.enhansoft.com/blog/where-to-find-user-name-data-
> in-configuration-manager-part-2
>
>
>
> Machine status is under v_r_system_valid for inactive 0 or 1.
>
>
>
> *Daniel Ratliff*
>
>
>
> *From:* [email protected] [mailto:listsadmin@lists.
> myitforum.com] *On Behalf Of *Kevin Ray
> *Sent:* Friday, December 02, 2016 10:41 AM
> *To:* mssms <[email protected]>; [email protected]
> *Subject:* [mssms] powershell script to pull the machine last rebooted
> information from active directory
>
>
>
> Hi All,
>
>
>
> I have 100 machines on text file and looking to get the last rebooted date
> , last logged on user name and machine status (like active or inactive)
> export to csv file
>
>
>
> Any help
>
> Kevin
>
>
>
>
>
>
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed
> and may contain CONFIDENTIAL material. If you receive this
> material/information in error,
> please contact the sender and delete or destroy the material/information.
>
>
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed
> and may contain CONFIDENTIAL material. If you receive this
> material/information in error,
> please contact the sender and delete or destroy the material/information.
>
>
>
>
>
>
>


-- 

Isaac Holmes
IT Engineering Specialist

University of Notre Dame
320 IT Center
Notre Dame, IN 46556

(574) 631-3254



Reply via email to