{"id":14282,"date":"2021-12-14T23:33:16","date_gmt":"2021-12-14T23:33:16","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=14282"},"modified":"2021-12-14T23:33:36","modified_gmt":"2021-12-14T23:33:36","slug":"batch-file-to-take-inventory-of-computers-on-the-network","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-to-take-inventory-of-computers-on-the-network\/30262.html","title":{"rendered":"Batch File To Take Inventory Of Computers On The Network"},"content":{"rendered":"<p>how do i create a batch file that will scan the network and print out the The types of systems on the network, mac address, IP address, computer make and model, computer name and the last person that logged into them?<\/p>\n<p>This is what I have so far but its not working and I dont understand, what is missing..<\/p>\n<p>for \/f &#8220;tokens=2*&#8221; %%a in (&#8216;net user &#8220;%Username%&#8221; \/domain ^| find \/i &#8220;Full Name&#8221;&#8216;) do set DisplayName=%%b<br \/>\necho Your display name is &#8220;%DisplayName%&#8221;<\/p>\n<p>REM **** Take Inventory ****<br \/>\nCD c:<br \/>\necho User Name: %DisplayName% (%username%) &gt; &#8220;C:\\%DisplayName%.txt&#8221;<br \/>\necho Computer: %computername% &gt;&gt; &#8220;C:\\%DisplayName%.txt&#8221;<br \/>\necho Date: %date% Time: %time% ^ &gt;&gt; &#8220;C:\\%DisplayName%.txt&#8221;<br \/>\necho. &gt;&gt; &#8220;C:\\%DisplayName%.txt&#8221;<\/p>\n<p>wmic csproduct get name | more &gt;&gt; &#8220;C:\\%DisplayName%.txt&#8221;<br \/>\nwmic bios get serialnumber | more &gt;&gt; &#8220;C:\\%DisplayName%.txt&#8221;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":161},"question-category":[55],"question_tags":[],"class_list":["post-14282","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/14282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=14282"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=14282"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=14282"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=14282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}