Not finding Computers in domain - New PS User

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 7 months ago.

  • Author
    Posts
  • #5477

    by GregSmith at 2013-01-28 07:40:52

    This snippet is from a much larger script that runs succesfully. However, it does not find all computers in the domain. My catch statement correctly identifies the computer name, that is not found.....BUT some of the "not found" computers are really there. What could be blocking access on these computers to the info? Script is running on a 2008 R2 Server....PS 3.0. Some of the missing computers are Windows 7 but not all. There XP's missing as well.

    foreach ($StrComputer in $colComputers){
    try{
    $GenItems1 = gwmi -ea Stop Win32_ComputerSystem -Comp $StrComputer

    ...
    ....

    Thanks,
    Greg

    by Klaas at 2013-01-28 08:09:50

    The account that you're running the script should be administrator on those hosts, and every host needs some settings to allow an RPC call. This can be set in a GPO, I think it's "allow inbound remote administration exception".

    by GregSmith at 2013-01-28 08:44:13

    Many thanks! I am runnig script as a domain admin. I will check the RPC settings and retry.

    by GregSmith at 2013-01-28 10:00:36

    I enabled GPO "allow inbound remote administration exception" on one of the computers that could not be read and repeated the script. It again, failed to pull off the info. I turned off silentlycontinue in my script and the error message is "RPC Server is unavailable". I looked at the RPC services on the computer in question and they are all started except the locator (Win7).

    by GregSmith at 2013-01-29 04:02:51

    Klass gave me the correct answer. Turns out I had to enableGPO "allow inbound remote administration exception" in both the domain and standard profile.

You must be logged in to reply to this topic.