{"id":166,"date":"2013-10-28T19:37:31","date_gmt":"2013-10-28T17:37:31","guid":{"rendered":"http:\/\/ps.stefanrehwald.de\/?p=166"},"modified":"2013-10-28T19:37:31","modified_gmt":"2013-10-28T17:37:31","slug":"powershell-scriptdauer-messen-teil-2","status":"publish","type":"post","link":"https:\/\/ps.stefanrehwald.de\/?p=166","title":{"rendered":"PowerShell &#8211; Scriptdauer messen Teil 2"},"content":{"rendered":"<p>Alternativ zum manuell erstellten Messverfahren gibt es noch die Cmdlet Measure-Command. F\u00fcr den in diesem Scriptblock ausgef\u00fchrten Code\u00a0 kann die Bearbeitungszeit ermittelt werden.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:ps decode:true\" title=\"Measure Script I\">$time = Measure-Command{\r\n\r\n&lt;# mache irgendetwas #&gt;\r\nsleep -Milliseconds 4233\r\n}\r\n\r\n# Ben\u00f6tigte Zeit\r\nWrite-Host \"$($time.Hours)h:$($time.Minutes)m:$($time.Seconds)s:$($time.Milliseconds)ms\" -BackgroundColor Magenta\r\n\r\n&lt;# Ausgabe:\r\n0h:0m:4s:231ms\r\n#&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>rewe<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Alternativ zum manuell erstellten Messverfahren gibt es noch die Cmdlet Measure-Command. F\u00fcr den in diesem Scriptblock ausgef\u00fchrten Code\u00a0 kann die Bearbeitungszeit ermittelt werden. &nbsp; $time = Measure-Command{ &lt;# mache irgendetwas #&gt; sleep -Milliseconds 4233 } # Ben\u00f6tigte Zeit Write-Host &#8222;$($time.Hours)h:$($time.Minutes)m:$($time.Seconds)s:$($time.Milliseconds)ms&#8220; &hellip; <a href=\"https:\/\/ps.stefanrehwald.de\/?p=166\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","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_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[166,267,270,167,272,273,274,265,266,178,269,268,271],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-date","tag-dauer-eines-scriptes-ermitteln","tag-endzeit","tag-get-date","tag-measure","tag-measure-command","tag-scriptdauer","tag-scriptdauer-ermitteln","tag-scriptdauer-messen","tag-sleep","tag-startzeit","tag-time","tag-zeitspanne-eines-scriptes"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Die Dauer eines Script ermitteln mittels Measure-Command\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Stefan Rehwald\"\/>\n\t<meta name=\"keywords\" content=\"scriptdauer ermitteln,measure,measure-command,scriptdauer messen,scriptdauer,dauer eines scriptes ermitteln,get-date,date,time,startzeit,endzeit,zeitspanne eines scriptes,sleep\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/ps.stefanrehwald.de\/?p=166\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"PowerShell Scripts | Eine Sammlung von PowerShell Snippets\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Wie lange l\u00e4uft ein Script | PowerShell Scripts\" \/>\n\t\t<meta property=\"og:description\" content=\"Die Dauer eines Script ermitteln mittels Measure-Command\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/ps.stefanrehwald.de\/?p=166\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-10-28T17:37:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-10-28T17:37:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Wie lange l\u00e4uft ein Script | PowerShell Scripts\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Die Dauer eines Script ermitteln mittels Measure-Command\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#article\",\"name\":\"Wie lange l\\u00e4uft ein Script | PowerShell Scripts\",\"headline\":\"PowerShell &#8211; Scriptdauer messen Teil 2\",\"author\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/#organization\"},\"datePublished\":\"2013-10-28T19:37:31+02:00\",\"dateModified\":\"2013-10-28T19:37:31+02:00\",\"inLanguage\":\"de-DE\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#webpage\"},\"articleSection\":\"Allgemein, date, Dauer eines Scriptes ermitteln, Endzeit, get-date, Measure, Measure-Command, Scriptdauer, Scriptdauer ermitteln, Scriptdauer messen, Sleep, Startzeit, time, Zeitspanne eines Scriptes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ps.stefanrehwald.de\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?cat=1#listItem\",\"name\":\"Allgemein\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?cat=1#listItem\",\"position\":2,\"name\":\"Allgemein\",\"item\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?cat=1\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#listItem\",\"name\":\"PowerShell &#8211; Scriptdauer messen Teil 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#listItem\",\"position\":3,\"name\":\"PowerShell &#8211; Scriptdauer messen Teil 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?cat=1#listItem\",\"name\":\"Allgemein\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/#organization\",\"name\":\"PowerShell Scripts\",\"description\":\"Eine Sammlung von PowerShell Snippets\",\"url\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?author=2#author\",\"url\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?author=2\",\"name\":\"Stefan Rehwald\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/00349957f89eb7edc5bfe4e8d19b2198e56cb63116c2a4ac8ba0e6b8b8b75451?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Stefan Rehwald\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#webpage\",\"url\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166\",\"name\":\"Wie lange l\\u00e4uft ein Script | PowerShell Scripts\",\"description\":\"Die Dauer eines Script ermitteln mittels Measure-Command\",\"inLanguage\":\"de-DE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?p=166#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/?author=2#author\"},\"datePublished\":\"2013-10-28T19:37:31+02:00\",\"dateModified\":\"2013-10-28T19:37:31+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/#website\",\"url\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/\",\"name\":\"PowerShell Scripts\",\"description\":\"Eine Sammlung von PowerShell Snippets\",\"inLanguage\":\"de-DE\",\"publisher\":{\"@id\":\"https:\\\/\\\/ps.stefanrehwald.de\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Wie lange l\u00e4uft ein Script | PowerShell Scripts","description":"Die Dauer eines Script ermitteln mittels Measure-Command","canonical_url":"https:\/\/ps.stefanrehwald.de\/?p=166","robots":"max-image-preview:large","keywords":"scriptdauer ermitteln,measure,measure-command,scriptdauer messen,scriptdauer,dauer eines scriptes ermitteln,get-date,date,time,startzeit,endzeit,zeitspanne eines scriptes,sleep","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#article","name":"Wie lange l\u00e4uft ein Script | PowerShell Scripts","headline":"PowerShell &#8211; Scriptdauer messen Teil 2","author":{"@id":"https:\/\/ps.stefanrehwald.de\/?author=2#author"},"publisher":{"@id":"https:\/\/ps.stefanrehwald.de\/#organization"},"datePublished":"2013-10-28T19:37:31+02:00","dateModified":"2013-10-28T19:37:31+02:00","inLanguage":"de-DE","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/ps.stefanrehwald.de\/?p=166#webpage"},"isPartOf":{"@id":"https:\/\/ps.stefanrehwald.de\/?p=166#webpage"},"articleSection":"Allgemein, date, Dauer eines Scriptes ermitteln, Endzeit, get-date, Measure, Measure-Command, Scriptdauer, Scriptdauer ermitteln, Scriptdauer messen, Sleep, Startzeit, time, Zeitspanne eines Scriptes"},{"@type":"BreadcrumbList","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de#listItem","position":1,"name":"Home","item":"https:\/\/ps.stefanrehwald.de","nextItem":{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de\/?cat=1#listItem","name":"Allgemein"}},{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de\/?cat=1#listItem","position":2,"name":"Allgemein","item":"https:\/\/ps.stefanrehwald.de\/?cat=1","nextItem":{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#listItem","name":"PowerShell &#8211; Scriptdauer messen Teil 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#listItem","position":3,"name":"PowerShell &#8211; Scriptdauer messen Teil 2","previousItem":{"@type":"ListItem","@id":"https:\/\/ps.stefanrehwald.de\/?cat=1#listItem","name":"Allgemein"}}]},{"@type":"Organization","@id":"https:\/\/ps.stefanrehwald.de\/#organization","name":"PowerShell Scripts","description":"Eine Sammlung von PowerShell Snippets","url":"https:\/\/ps.stefanrehwald.de\/"},{"@type":"Person","@id":"https:\/\/ps.stefanrehwald.de\/?author=2#author","url":"https:\/\/ps.stefanrehwald.de\/?author=2","name":"Stefan Rehwald","image":{"@type":"ImageObject","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/00349957f89eb7edc5bfe4e8d19b2198e56cb63116c2a4ac8ba0e6b8b8b75451?s=96&d=mm&r=g","width":96,"height":96,"caption":"Stefan Rehwald"}},{"@type":"WebPage","@id":"https:\/\/ps.stefanrehwald.de\/?p=166#webpage","url":"https:\/\/ps.stefanrehwald.de\/?p=166","name":"Wie lange l\u00e4uft ein Script | PowerShell Scripts","description":"Die Dauer eines Script ermitteln mittels Measure-Command","inLanguage":"de-DE","isPartOf":{"@id":"https:\/\/ps.stefanrehwald.de\/#website"},"breadcrumb":{"@id":"https:\/\/ps.stefanrehwald.de\/?p=166#breadcrumblist"},"author":{"@id":"https:\/\/ps.stefanrehwald.de\/?author=2#author"},"creator":{"@id":"https:\/\/ps.stefanrehwald.de\/?author=2#author"},"datePublished":"2013-10-28T19:37:31+02:00","dateModified":"2013-10-28T19:37:31+02:00"},{"@type":"WebSite","@id":"https:\/\/ps.stefanrehwald.de\/#website","url":"https:\/\/ps.stefanrehwald.de\/","name":"PowerShell Scripts","description":"Eine Sammlung von PowerShell Snippets","inLanguage":"de-DE","publisher":{"@id":"https:\/\/ps.stefanrehwald.de\/#organization"}}]},"og:locale":"de_DE","og:site_name":"PowerShell Scripts | Eine Sammlung von PowerShell Snippets","og:type":"article","og:title":"Wie lange l\u00e4uft ein Script | PowerShell Scripts","og:description":"Die Dauer eines Script ermitteln mittels Measure-Command","og:url":"https:\/\/ps.stefanrehwald.de\/?p=166","article:published_time":"2013-10-28T17:37:31+00:00","article:modified_time":"2013-10-28T17:37:31+00:00","twitter:card":"summary","twitter:title":"Wie lange l\u00e4uft ein Script | PowerShell Scripts","twitter:description":"Die Dauer eines Script ermitteln mittels Measure-Command"},"aioseo_meta_data":{"post_id":"166","title":"Wie lange l\u00e4uft ein Script | #site_title","description":"Die Dauer eines Script ermitteln mittels Measure-Command","keywords":[{"label":"Scriptdauer ermitteln","value":"Scriptdauer ermitteln"},{"label":"Measure","value":"Measure"},{"label":"Measure-Command","value":"Measure-Command"},{"label":"Scriptdauer messen","value":"Scriptdauer messen"},{"label":"Scriptdauer","value":"Scriptdauer"},{"label":"Dauer eines Scriptes ermitteln","value":"Dauer eines Scriptes ermitteln"},{"label":"get-date","value":"get-date"},{"label":"date","value":"date"},{"label":"time","value":"time"},{"label":"Startzeit","value":"Startzeit"},{"label":"Endzeit","value":"Endzeit"},{"label":"Zeitspanne eines Scriptes","value":"Zeitspanne eines Scriptes"},{"label":"sleep","value":"sleep"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-30 00:57:16","updated":"2025-10-06 09:19:05","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/ps.stefanrehwald.de\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/ps.stefanrehwald.de\/?cat=1\" title=\"Allgemein\">Allgemein<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPowerShell \u2013 Scriptdauer messen Teil 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/ps.stefanrehwald.de"},{"label":"Allgemein","link":"https:\/\/ps.stefanrehwald.de\/?cat=1"},{"label":"PowerShell &#8211; Scriptdauer messen Teil 2","link":"https:\/\/ps.stefanrehwald.de\/?p=166"}],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3N2Ht-2G","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":2,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":170,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions\/170"}],"wp:attachment":[{"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ps.stefanrehwald.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}