how to get windows version for remote computer using code

get windows 10 version remotely
powershell get os version remote
powershell command to get os version of remote computer
remotely determine windows version
powershell get windows 10 build number remote computer
get-windows version is not recognized
powershell get windows 10 version number
check windows 10 version remotely

I'm developing small app using visual studio 2013, VB to scan range of IP addresses in same network

my app will take IP's and return

Ping status (True or False)

Computer Name

MAC address

and all OK

my question is if i need to get remote computer windows (xp or 7 or 8 )

using IP address or computer name how i can do that?

Dim osVer As String
osVer = System.Environment.OSVersion.ToString

vb.net, As Josh King noted you can use srvinfo which is a Windows 2003 Resource Kit tool. On Windows 7 you can use systeminfo systeminfo /s  Applies to: Windows 10, Windows 10 IoT Enterprise, and Windows 7 You can use the Remote Desktop client for Windows Desktop to access Windows apps and desktops remotely from a different Windows device.

Finally I used system management as below

(after importing System.Management)

I used two Functions

first one to connect remote Computer then collect data

Private Function tryConnect(SystemName As String)
        Try
            Dim ComputerConnection As New System.Management.ConnectionOptions
            ' to add user name and password
            'ComputerConnection.Username = "UserName"
            'ComputerConnection.Password = "Password"

            With ComputerConnection
                .Impersonation = System.Management.ImpersonationLevel.Impersonate
                .Authentication = System.Management.AuthenticationLevel.Packet

            End With
            'connect to WMI
            MyMgtScope = New System.Management.ManagementScope("\\" & SystemName & "\root\CIMV2", ComputerConnection)
            MyMgtScope.Connect()
            Return MyMgtScope.IsConnected
        Catch ex As Exception
            Return False
        End Try
End Function

private sub GetOsdata()
    if tryConnect(remoteComputerName) = False then Exit Sub ' or show some message
    Dim MyMgtScope As System.Management.ManagementScope
    Dim MyObjSearcher As System.Management.ManagementObjectSearcher
    Dim MyColl As System.Management.ManagementObjectCollection
    Dim MyObj As System.Management.ManagementObject
    Dim ComputerOSVersion , ComputerOSServiceBack ,OSbit As String
    MyObjSearcher = New System.Management.ManagementObjectSearcher(MyMgtScope.Path.ToString, "Select * FROM Win32_OperatingSystem")
                ' Execute the query
    MyColl = MyObjSearcher.Get
                For Each MyObj In MyColl
                    ComputerOSVersion = MyObj.GetPropertyValue("Caption").ToString
                    ComputerOSServiceBack = MyObj.GetPropertyValue("ServicePackMajorVersion").ToString
                    OSbit = MyObj.GetPropertyValue("OSArchitecture").ToString
               Next

               MyObjSearcher = Nothing
               MyColl = Nothing
End Sub

how to get windows version for remote computer using code, Get windows version information from remote computers using an alternate credential. .Example. PS C:\> Get-WindowsVersion -Computername win10 -​AsString. The OP wants to get a remote computer's Windows version by specifying its IP or hostname. This code only gets his/her public IP. This code only gets his/her public IP. – Visual Vincent May 13 '18 at 9:31

   Using wClient As New WebClient
                   dim myip as string = wClient.DownloadString("http://tools.feron.it/php/ip.php")

                End Using

maybe help for find ip easly. good luck

Finding the Windows version of a remote machine in the same , The script examples shown in this topic obtain data only from the remote computers, see Connecting to WMI on a Remote Computer. Copy the code and save it in a file with a .vbs extension, such as filename.vbs. determine which version of the Windows operating system is installed on a computer? How to use Remote Desktop. Use Remote Desktop on your Windows 10 PC or on your Windows, Android, or iOS device to connect to a PC from afar. Set up the PC you want to connect to so it allows remote connections: On the device you want to connect to, select Start > Settings > System > Remote Desktop, and turn on Enable Remote Desktop.

A set of PowerShell functions to remotely query the registry and get , We are retiring the TechNet Gallery. Make sure to back up your code. Learn More · Script Center. To find Windows OS version from command line we can use systeminfo command. We can get service pack number and Windows edition from windows command line.

WMI Tasks: Operating Systems, To check the Windows Version remotely to reduce the manual work to login and check. With this you can get only following Versions:Microsoft Windows 2000 Product=Windows XP Professional and Windows Server 2003. wmic csproduct get vendor, version. There’s another command which can be used to get the computer system model information. We can also get architecture(32bit/64bit) using this command. wmic computersystem get model,name,manufacturer,systemtype. Based on the information you require, you can use any of the above commands.

Script Get file version on Remote Computer using PowerShell, You will see the service pack, edition and system type of your Windows 7 OS in the pop-up window. RECOMMENDED. Resolve PC Issues with  To scale the remote computer desktop screen within your local computer window, Launch the RemotePC application and log in. Connect to an online remote computer, and establish connection. From the application menu, go to 'View' -> 'Scaling'. Click 'Best Fit'. This will resize the remote computer desktop screen to fit within the local computer window.

Comments
  • Check here: superuser.com/questions/312120/…
  • Thanks for this link but they use Power Shell not VB Code
  • Ah, can you post yours? That will helps someone to give you an answer.
  • @JacobH / ER, then it looks like you'll have to combine that answer with Run Command Prompt Commands in .NET
  • @ – Jacob H 2, I have no code.
  • That's true for the current process/computer running the code, I think OP needs to be able to derive that based solely from an IP address
  • The OP wants to get a remote computer's Windows version by specifying its IP or hostname. This code only gets his/her public IP.