{"id":417,"date":"2023-03-25T11:28:51","date_gmt":"2023-03-25T11:28:51","guid":{"rendered":"https:\/\/xuan.co.uk\/?p=417"},"modified":"2025-08-06T07:16:31","modified_gmt":"2025-08-06T07:16:31","slug":"capture-service-tag-assset-tag-of-dell-systems-and-more","status":"publish","type":"post","link":"https:\/\/xuan.co.uk\/?p=417","title":{"rendered":"Capture service tag, assset tag of Dell systems and more"},"content":{"rendered":"<p>echo off<br \/>\ncls<br \/>\n::<br \/>\n:: This needs to run as admin for bitlocker to report status.<br \/>\n::<br \/>\n:: This batch file will create an informative capture of a bitlocker status once complete encryption using cap.exe dos screen capture.<\/p>\n<p>::find out what path the batch file is in<br \/>\nset batch_path=%~dp0<\/p>\n<p>::change drive<br \/>\n%batch_path:~0,2%<\/p>\n<p>::crop the last character and cd into it<br \/>\ncd %batch_path:~0,-1%<\/p>\n<p>::we loop until bitlocker task is 100%<\/p>\n<p>echo Waiting for Bitlocker Encrytion to be 100%<br \/>\n:loop<br \/>\n::repeat until find 100%<br \/>\ntimeout 1 &gt; nul<br \/>\necho .<br \/>\nmanage-bde c: -status | find &#8220;100%&#8221;<br \/>\nif errorlevel 1 goto loop<br \/>\n::bitlocker done<\/p>\n<p>:: clear screen show bitlocker status<br \/>\ncls<br \/>\nmanage-bde c: -status<\/p>\n<p>:: display information on build<br \/>\necho Enginner: %HomePath%<br \/>\necho Machine name: %ComputerName%<\/p>\n<p>::pipe machine service tag to serial.txt so that later we can reverse pipe into the variable that used to name the capture file<br \/>\nwmic bios get serialnumber | find \/v &#8220;SerialNumber&#8221; &gt; %temp%\/serial.txt<\/p>\n<p>::pipe in serial<br \/>\nset \/p serial=&lt;%temp%\\serial.txt<\/p>\n<p>:: trim spaces<br \/>\nset serial_temp=%serial: =%<\/p>\n<p>:: store serial<br \/>\nset serial=%serial_temp%<\/p>\n<p>::pipe machine asset tag to asset.txt so that later we can reverse pipe into the variable that used to name the capture file<br \/>\nwmic systemenclosure get SMBIOSAssetTag | find \/v &#8220;SMBIOSAssetTag&#8221; &gt; %temp%\/asset.txt<\/p>\n<p>::pipe in asset tag<br \/>\nset \/p asset=&lt;%temp%\\asset.txt<\/p>\n<p>:: trim spaces<br \/>\nset asset_temp=%asset: =%<\/p>\n<p>:: store asset tag<br \/>\nset asset=%asset_temp%<\/p>\n<p>:: display system info<br \/>\necho Service Tag: %serial% &#8211; Asset Tag: &#8211; %asset%<br \/>\necho Users directories present:<br \/>\ndir c:\\Users\\ \/b<br \/>\necho Capture taken on %date%<\/p>\n<p>:: capture the screen, set to 1080p<br \/>\ncap &#8220;Bitlocker &#8211; Service Tag %serial% &#8211; Machine %ComputerName% &#8211; Asset Tag %asset%.jpg&#8221; 0 0 1920 1080<\/p>\n<p>:: create an export of all software install, diagnostic<br \/>\n::echo Exporting software list to &#8220;Machine %ComputerName% &#8211; Service Tag %serial% &#8211; Asset Tag %asset%.txt&#8221;<br \/>\n::wmic product get name, version, vendor &gt; &#8220;Machine %ComputerName% &#8211; Service Tag %serial% &#8211; Asset Tag %asset%.txt&#8221;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>echo off cls :: :: This needs to run as admin for bitlocker to report status. :: :: This batch file will create an informative capture of a bitlocker status once complete encryption using cap.exe dos screen capture. ::find out what path the batch file is in set batch_path=%~dp0 ::change <a class=\"more-link\" href=\"https:\/\/xuan.co.uk\/?p=417\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[81,82],"class_list":["post-417","post","type-post","status-publish","format-standard","hentry","category-tech-tips","tag-cmd","tag-service-tag"],"_links":{"self":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=417"}],"version-history":[{"count":3,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/417\/revisions"}],"predecessor-version":[{"id":483,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/417\/revisions\/483"}],"wp:attachment":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}