locked
Help with Install-Module dotnetversionlister RRS feed

  • Question

  • Hello Guys,


    So i have installed PS6, along with the below module

    Install-Module dotnetversionlister
    $creds = get-credentials
    Install-Module dotnetversionlister
    Get-content c:\machines.txt | foreach {Get-DotNetVersion -ComputerName $_ -Credential $creds | out-file c:\output.txt }  

    And used the above script to pull the .Net version from remote machines


    I have 2 problems with this script.


    First, the output file is being generated and its empty.


    If i just run the below command:


    Get-content c:\machines.txt | foreach {Get-DotNetVersion -ComputerName $_ -Credential $creds

    I am able to get the output for few machines and getting the below for most of them:

    Pinging WUX-D80003270.ccc.com [10.x.x.x] with 32 bytes of data:
    Reply from 10.x.x.x: bytes=32 time=2ms TTL=126
    Ping complete.
    WARNING: WUX-D80003270.ccc.com: Unable to open remote registry: Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not
    Ping  : True
    Error : Unable to open remote registry: Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found"
    
    ComputerName : WUX-D80003270.ccc.com
    >=4.x        :
    v4\Client    :
    v4\Full      :
    v3.5         :
    v3.0         :
    v2.0.50727   :
    v1.1.4322    :
    Ping         : True
    Error        : Unable to open remote registry: Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found"
    
        Script start time: 09/26/2019 11:53:53
        Script end time:   09/26/2019 11:53:53

    Can anyone guide me as i have to pull these details for about 2600 machines.


    Regards, Prasad

    Thursday, September 26, 2019 3:55 AM

Answers

  • Looks like everything is being blocked.

    Now i used psexec to pull the information.

    psexec @c:\Users\prasad.pillai\Desktop\c.txt powershell.exe get-ChildItem C:\Windows\Microsoft.Net\Framework\v*



    Regards, Prasad

    Friday, September 27, 2019 3:15 AM

All replies

  • Read the error carefully. It is telling y9uo that the remote registry is not available. Firewall? Registry Service not running?


    \_(ツ)_/

    Thursday, September 26, 2019 4:09 AM
  • Hi,

    Thanks for your question.

     First, the output file is being generated and its empty.

    Please try to  use "-append" parameter with "out-file" cmdlet, Otherwise the content in the text file will be overwritten in the foreach loop.

    Best regards,

    Lee


    Just do it.

    Thursday, September 26, 2019 8:07 AM
  • Looks like everything is being blocked.

    Now i used psexec to pull the information.

    psexec @c:\Users\prasad.pillai\Desktop\c.txt powershell.exe get-ChildItem C:\Windows\Microsoft.Net\Framework\v*



    Regards, Prasad

    Friday, September 27, 2019 3:15 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.

    Thursday, October 3, 2019 2:10 AM