{"id":871,"date":"2016-05-14T12:37:29","date_gmt":"2016-05-14T10:37:29","guid":{"rendered":"http:\/\/www.rolig.dk\/?p=871"},"modified":"2016-05-14T12:37:29","modified_gmt":"2016-05-14T10:37:29","slug":"test-task-sequence-variables-in-windows","status":"publish","type":"post","link":"https:\/\/rolig.dk\/?p=871","title":{"rendered":"Test Task Sequence Variables in Windows"},"content":{"rendered":"<p>There is a very easy way to test task sequence variables without doing a full OS deployment. You can use \u201c<a href=\"https:\/\/onedrive.live.com\/redir?resid=447ADB7F2AA023F5!10915&amp;authkey=!ABTLDiQQfNwEfnA&amp;ithint=folder%2cwsf\" target=\"_blank\" rel=\"noopener noreferrer\">ServiceUI.exe<\/a>\u201d witch is located in the MDT toolkit package under \u201cTools\\x64\\\u201d and then run it on a Windows machine.<\/p>\n<p>1. Create a Custom task sequence and add a \u201cRun Command Line\u201d step with the following command: &#8220;tools\\x64\\ServiceUI.exe&#8221; -process:TSProgressUI.exe C:\\Windows\\System32\\cmd.exe<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/05\/image-55.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/05\/image_thumb-55.png\" width=\"600\" height=\"548\"><\/a><\/p>\n<p>2. Deploy it to a collection that contains you Windows Test PC and run it from \u201cSoftware Center\u201d.<\/p>\n<p>3. When the cmd appear, then type \u201cPowerShell\u201d to start PowerShell<\/p>\n<p>4. In this example I will get the value of a computer variable called OSDtest.<\/p>\n<p>4a. Type \u201c$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment\u201d<\/p>\n<p>4b. Type: \u201c$OSDtestvar =&nbsp; $tsenv.Value(&#8220;OSDtest&#8221;)\u201d<\/p>\n<p>4c. Type \u201cWrite-Host $OSDtestvar\u201d<\/p>\n<p>4d. The output is \u201cTest Variable\u201d<a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/05\/image-56.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/05\/image_thumb-56.png\" width=\"600\" height=\"312\"><\/a><\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F871&amp;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F871&amp;title=Test%20Task%20Sequence%20Variables%20in%20Windows\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/linkedin.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>There is a very easy way to test task sequence variables without doing a full OS deployment. You can use \u201cServiceUI.exe\u201d witch is located in the MDT toolkit package under \u201cTools\\x64\\\u201d and then run it on a Windows machine. 1. Create a Custom task sequence and add a \u201cRun Command Line\u201d step with the following [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[48],"class_list":["post-871","post","type-post","status-publish","format-standard","hentry","category-sccm","tag-sccmosdtask-sequenceserviceui"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=871"}],"version-history":[{"count":0,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/871\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}