{"id":4860,"date":"2026-08-29T20:10:35","date_gmt":"2026-08-29T11:10:35","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/winrm-remote-windows-info-2\/"},"modified":"2026-08-29T20:10:37","modified_gmt":"2026-08-29T11:10:37","slug":"winrm-remote-windows-info","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/linux-server-network\/winrm-remote-windows-info\/","title":{"rendered":"Retrieving Detailed Windows Version Information Remotely Using WinRM"},"content":{"rendered":"<p class=\"whitespace-pre-wrap break-words\">This guide explains how to remotely retrieve detailed version information from Windows servers and clients. We will walk through the steps to securely collect system information leveraging WinRM and PowerShell.<\/p>\n<h2 class=\"font-600 text-xl font-bold\">Prerequisites<\/h2>\n<h3 class=\"font-600 text-lg font-bold\">Server-Side Configuration<\/h3>\n<ol>\n<li>Checking and changing the network profile<\/li>\n<\/ol>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code><span class=\"token\"># \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u78ba\u8a8d\n<\/span><span class=\"token\">Get-NetConnectionProfile\n<\/span><span class=\"token\"># \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09<\/span> \n<span class=\"token\">Set-NetConnectionProfile<\/span> <span class=\"token\">-<\/span>Name <span class=\"token\">\"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u540d\"<\/span> <span class=\"token\">-<\/span>NetworkCategory Private<\/code><\/pre>\n<\/div>\n<ol class=\"-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8\" start=\"2\">\n<li class=\"whitespace-normal break-words\">Enabling PowerShell Remoting<\/li>\n<\/ol>\n<div class=\"relative flex flex-col rounded-lg\">\n<div>\n<div class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code># PowerShell\u30ea\u30e2\u30fc\u30c8\u51e6\u7406\u3092\u6709\u52b9\u5316\nEnable-PSRemoting -Force<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<ol class=\"-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8\" start=\"3\">\n<li class=\"whitespace-normal break-words\">Adding remote management users<\/li>\n<\/ol>\n<div class=\"relative flex flex-col rounded-lg\">\n<div class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code><span class=\"token\"># \u30c9\u30e1\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u5834\u5408\n<\/span><span class=\"token\">Add-LocalGroupMember<\/span> <span class=\"token\">-<\/span><span class=\"token\">Group<\/span> <span class=\"token\">\"Remote Management Users\"<\/span> <span class=\"token\">-<\/span>Member <span class=\"token\">\"DOMAIN\\\u30e6\u30fc\u30b6\u30fc\u540d\"\n\n<\/span><span class=\"token\"># \u30ed\u30fc\u30ab\u30eb\u30e6\u30fc\u30b6\u30fc\u306e\u5834\u5408\n<\/span><span class=\"token\">Add-LocalGroupMember<\/span> <span class=\"token\">-<\/span><span class=\"token\">Group<\/span> <span class=\"token\">\"Remote Management Users\"<\/span> <span class=\"token\">-<\/span>Member <span class=\"token\">\"\u30ed\u30fc\u30ab\u30eb\u30e6\u30fc\u30b6\u30fc\u540d\"<\/span><\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h3 class=\"font-600 text-lg font-bold\">Client-Side Configuration<\/h3>\n<ol class=\"-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">Starting the WinRM service<\/li>\n<\/ol>\n<div class=\"relative flex flex-col rounded-lg\">\n<div>\n<div class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code># WinRM\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\nStart-Service WinRM\n\n<span class=\"token\"># WinRM\u69cb\u6210\u306e\u78ba\u8a8d\n<\/span>winrm quickconfig<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<ol class=\"-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8\" start=\"2\">\n<li class=\"whitespace-normal break-words\">Configuring Trusted Hosts<\/li>\n<\/ol>\n<div class=\"relative flex flex-col rounded-lg\">\n<div>\n<div class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code># \u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u3092TrustedHosts\u306b\u8ffd\u52a0\nSet-Item WSMan:\\localhost\\Client\\TrustedHosts -Value \"\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\" -Force<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 class=\"font-600 text-xl font-bold\">Script for Retrieving Detailed Version Information<\/h2>\n<p>Run this on the client:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-powershell\" data-lang=\"PowerShell\"><code># \u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u306e\u4f5c\u6210\n$credential = Get-Credential\n\n# \u30ea\u30e2\u30fc\u30c8\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\nInvoke-Command -ComputerName \"\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\" -Credential $credential -ScriptBlock {\n    # Windows\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u306e\u53d6\u5f97\n    $osInfo = Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\"\n\n    # \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306e\u66f4\u65b0\u30d7\u30ed\u30b0\u30e9\u30e0\u60c5\u5831\n    $updateInfo = Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5\n\n    # \u7d50\u679c\u3092\u30ab\u30b9\u30bf\u30e0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u8fd4\u3059\n    [PSCustomObject]@{\n        # OS\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\n        ProductName = $osInfo.ProductName\n        CurrentVersion = $osInfo.CurrentVersion\n        ReleaseId = $osInfo.ReleaseId\n        CurrentBuild = $osInfo.CurrentBuild\n        UBR = $osInfo.UBR\n\n        # \u8ffd\u52a0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u8a73\u7d30\n        BuildLabEx = $osInfo.BuildLabEx\n        InstallationType = $osInfo.InstallationType\n\n        # \u6700\u8fd1\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u66f4\u65b0\u30d7\u30ed\u30b0\u30e9\u30e0\n        RecentUpdates = $updateInfo | ForEach-Object {\n            [PSCustomObject]@{\n                HotFixID = $_.HotFixID\n                Description = $_.Description\n                InstalledOn = $_.InstalledOn\n            }\n        }\n\n        # \u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u66f4\u65b0\u72b6\u6cc1\n        LastInstalledUpdate = (Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn\n        TotalInstalledUpdates = (Get-HotFix).Count\n    }\n}<\/code><\/pre>\n<\/div>\n<div class=\"relative flex flex-col rounded-lg\">\n<div><\/div>\n<\/div>\n<h2 class=\"font-600 text-xl font-bold\">Details of the Output Information<\/h2>\n<p class=\"whitespace-pre-wrap break-words\">Main information that can be retrieved:<\/p>\n<ul class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">Product Name (ProductName)<\/li>\n<li class=\"whitespace-normal break-words\">Current Version (CurrentVersion)<\/li>\n<li class=\"whitespace-normal break-words\">Release ID (ReleaseId)<\/li>\n<li class=\"whitespace-normal break-words\">Current Build Number (CurrentBuild)<\/li>\n<li class=\"whitespace-normal break-words\">UBR (Update Build Revision)<\/li>\n<li class=\"whitespace-normal break-words\">BuildLabEx (Extended build information)<\/li>\n<li class=\"whitespace-normal break-words\">Installation Type<\/li>\n<li class=\"whitespace-normal break-words\">Recently Installed Updates (latest 5)<\/li>\n<li class=\"whitespace-normal break-words\">Last Update Date<\/li>\n<li class=\"whitespace-normal break-words\">Total Number of Installed Updates<\/li>\n<\/ul>\n<h2 class=\"font-600 text-xl font-bold\">Security and Considerations<\/h2>\n<ul class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">Follow the principle of least privilege.<\/li>\n<li class=\"whitespace-normal break-words\">Use secure authentication methods.<\/li>\n<li class=\"whitespace-normal break-words\">Pay attention to network security.<\/li>\n<li class=\"whitespace-normal break-words\">Keep the system regularly updated.<\/li>\n<\/ul>\n<h2 class=\"font-600 text-xl font-bold\">Troubleshooting<\/h2>\n<h3 class=\"font-600 text-lg font-bold\">Common Connection Errors<\/h3>\n<ol class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">&#8220;FullyQualifiedErrorId : CreateRemoteRunspaceFailed&#8221;\n<ul class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">Cause: The user is not added to the &#8220;Remote Management Users&#8221; group.<\/li>\n<li class=\"whitespace-normal break-words\">Solution: Add the user to the group on the server side.<\/li>\n<\/ul>\n<\/li>\n<li class=\"whitespace-normal break-words\">Connection Errors\n<ul class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\n<li class=\"whitespace-normal break-words\">Check the firewall.<\/li>\n<li class=\"whitespace-normal break-words\">Review network settings.<\/li>\n<li class=\"whitespace-normal break-words\">Verify the status of the WinRM service.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2 class=\"font-600 text-xl font-bold\">Conclusion<\/h2>\n<p class=\"whitespace-pre-wrap break-words\">By using WinRM and PowerShell, you can securely and efficiently collect detailed Windows-based system information remotely. Feel free to customize the script according to your environment.<\/p>\n<p class=\"whitespace-pre-wrap break-words\"><strong>Note<\/strong>: Please adjust appropriately for your actual environment and pay close attention to security.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide explains how to remotely retrieve detailed version information from Windows servers and clients. We [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1079,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=236","footnotes":""},"categories":[1170],"tags":[1005,10,310,381,99],"class_list":["post-4860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-server-network","tag-windows","tag-server","tag-310","tag-381","tag-99","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=4860"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4860\/revisions"}],"predecessor-version":[{"id":4863,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4860\/revisions\/4863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/1079"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=4860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=4860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=4860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}