locked
About Get the last logon time and last boot time Problem for AD domain RRS feed

  • Question

  • Hi Friend,

    My script :

    $tp_pcs = get-adcomputer -filter * -searchbase "ou=xx,ou=xx,dc=ap,dc=xxxx,dc=com" -Properties name,lastlogondate

    $tp_pcs2 = Get-CimInstance -ClassName win32_operatingsystem -ComputerName $tp_pcs.name -ea SilentlyContinue | select csname,lastbootuptime

    Some PCs has lastlogondate but hasn't lastbootuptime

    ex, PC1 , PC2 all has lastlogondate , but PC1 hasn't lastbootuptime

    PC1 and PC2 all in AD domain , but I can't to get PC1 lastbootuptime , has issue for Domain or PC?


    Hi I can't to find solution for solve this issue, I have Event 364 Source File: /Content/1B/DCD02B975BCC454188A2BB1F036E3E590C25641B.exe Destination File: D:\WSUS\WsusContent\1B\DCD02B975BCC454188A2BB1F036E3E590C25641B.exe But I don't know how to deline this KB Number..

    Thursday, October 3, 2019 2:34 AM

All replies

  • Hi,

    Thanks for your question.

    Please try to remove -ea silentlyContinue, that will prevent you from seeing the error message.

    Lastlogondate is a ad property, but the lastbootuptime is stored on your destination computer. So maybe the reason is your wmi remote problem.

    Best regards,

    Lee


    Just do it.

    Thursday, October 3, 2019 5:42 AM
  • Hi Lee,

    Thanks for your response, has method for this error? WinRM issue..


    Fix WinRM

        C:\Windows\system32>WinRM quickconfig
     WinRM service is already running on this machine.
     WinRM is not set up to allow remote access to this machine for management.
     The following changes must be made:
    
     Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
     machine.
    
     Make these changes [y/n]? y
    
     WinRM has been updated for remote management.
    
     Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
     machine.



    Thursday, October 3, 2019 6:08 AM
  • Please try to follow your error message to fix it.

    Have you run the "WinRM quickconfig" on your remote pc1?

    Best regards,

    Lee


    Just do it.

    Thursday, October 3, 2019 7:27 AM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee


    Just do it.

    Tuesday, October 8, 2019 8:37 AM
  • Hi OP, Perhaps access to the remote computer over RPC ports is blocked by firewalls. You should check whether port 135 is open or not:

    telnet <remote Server> 135
    Wednesday, October 9, 2019 10:58 AM