{"id":2246,"date":"2020-10-19T23:30:20","date_gmt":"2020-10-19T21:30:20","guid":{"rendered":"https:\/\/www.mosi.at\/ikt\/?p=2246"},"modified":"2020-10-19T23:45:12","modified_gmt":"2020-10-19T21:45:12","slug":"powershell-storagepool-physischen-datentraeger-auslesen","status":"publish","type":"post","link":"https:\/\/www.mosi.at\/ikt\/2020\/10\/19\/powershell-storagepool-physischen-datentraeger-auslesen\/","title":{"rendered":"PowerShell: Storagepool physischen Datentr\u00e4ger auslesen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Auslesen der aller pysischen Datenr\u00e4ger eines Storagepools mit Powershell.<br>Angezeigt werden unter anderem das Modell, die Seriennummer, der Medientyp, die PhysicalLocation und der Gesundheitsstatus.<br> Die Ausgabe wird nach der PhysicalLocation sortiert. Die Serienummer wird von Leerzeichen befreit. Die Gr\u00f6\u00dfe wird in Terabyte mit 3 Nachkommastellen formatiert. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><span style=\"color: #003366;\">Get-StoragePool | Where-Object {$_.IsPrimordial -ne &#8222;True&#8220;} | Get-PhysicalDisk | Sort-Object PhysicalLocation | FT PhysicalLocation, BusType, MediaType, FriendlyName, @{Name=\u201cSize in TB\u201c; Expression={[math]::round($_.size\/1TB, 3)}}, @{Name=&#8220;SerialNumber&#8220;; Expression={$_.SerialNumber.trim()}}, HealthStatus, OperationalStatus, CanPool<\/span><\/strong><br> <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\> Get-StoragePool | Where-Object {$_.IsPrimordial -ne \"True\"} | Get-PhysicalDisk | Sort-Object PhysicalLocation  | FT PhysicalLocation, BusType, MediaType, FriendlyName, @{Name=\u201cSize in TB\u201c; Expression={&#91;math]::round($_.size\/1TB, 3)}}, @{Name=\"SerialNumber\"; Expression={$_.SerialNumber.trim()}}, HealthStatus, OperationalStatus, CanPool\n\nPhysicalLocation                BusType MediaType FriendlyName         Size in TB SerialNumber    HealthStatus OperationalStatus CanPool\r\n----------------                ------- --------- ------------         ---------- ------------    ------------ ----------------- -------\r\nIntegrated : Adapter 0 : Port 2 SATA    HDD       TOSHIBA HDWQ140           3,638 Y7GUK0NQAAAA    Healthy      OK                  False\r\nIntegrated : Adapter 0 : Port 3 SATA    HDD       WDC WD30EFRX-68EUZN0      2,728 WD-WCC4N060BBBB Healthy      OK                  False\r\nIntegrated : Adapter 0 : Port 4 SATA    HDD       WDC WD30EFRX-68EUZN0      2,728 WD-WMC4N110CCCC Healthy      OK                  False\r\nIntegrated : Adapter 0 : Port 5 SATA    HDD       WDC WD30EFRX-68EUZN0      2,728 WD-WMC4N08DDDDD Healthy      OK                  False <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Auslesen der aller pysischen Datenr\u00e4ger eines Storagepools mit Powershell.Angezeigt werden unter anderem das Modell, die Seriennummer, der Medientyp, die PhysicalLocation und der Gesundheitsstatus. Die Ausgabe wird nach der PhysicalLocation sortiert. Die Serienummer wird von Leerzeichen befreit. Die Gr\u00f6\u00dfe wird in Terabyte mit 3 Nachkommastellen formatiert. Get-StoragePool | Where-Object {$_.IsPrimordial -ne &#8222;True&#8220;} | Get-PhysicalDisk | Sort-Object [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1899,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_front_end_style_editor":"no","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","osp_disable_panel":"default","osh_disable_topbar_sticky":"default","osh_disable_header_sticky":"default","osh_sticky_header_style":"default","osh_sticky_header_effect":"","osh_custom_sticky_logo":0,"osh_custom_retina_sticky_logo":0,"osh_custom_sticky_logo_height":0,"osh_background_color":"","osh_links_color":"","osh_links_hover_color":"","osh_links_active_color":"","osh_links_bg_color":"","osh_links_hover_bg_color":"","osh_links_active_bg_color":"","osh_menu_social_links_color":"","osh_menu_social_hover_links_color":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[9,20,110,111,18,16,24,23],"tags":[],"class_list":["post-2246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-__news","category-power-shell","category-powershell-5-1","category-powershell-7","category-scripts","category-windows","category-windows-10","category-windows-server-2016","entry","has-media"],"_links":{"self":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts\/2246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/comments?post=2246"}],"version-history":[{"count":5,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts\/2246\/revisions"}],"predecessor-version":[{"id":2251,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts\/2246\/revisions\/2251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/media\/1899"}],"wp:attachment":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/media?parent=2246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/categories?post=2246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/tags?post=2246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}