1<!DOCTYPE html> 2<html lang="en"> 3<head> 4<meta charset="UTF-8" /> 5<title> 6Quick Hits: Adding Items to an Array and a Look at Performance | Learn Powershell | Achieve More</title> 7<link rel="profile" href="https://gmpg.org/xfn/11" /> 8<link rel="stylesheet" type="text/css" media="all" href="https://s2.wp.com/wp-content/themes/pub/twentyten/style.css?m=1659017451i&ver=20190507" /> 9<link rel="pingback" href="https://learn-powershell.net/xmlrpc.php"> 10<meta name='robots' content='max-image-preview:large' /> 11 12<!-- Async WordPress.com Remote Login -->
13<script id="wpcom_remote_login_js"> 14var wpcom_remote_login_extra_auth = ''; 15function wpcom_remote_login_remove_dom_node_id( element_id ) { 16 var dom_node = document.getElementById( element_id ); 17 if ( dom_node ) { dom_node.parentNode.removeChild( dom_node ); } 18} 19function wpcom_remote_login_remove_dom_node_classes( class_name ) { 20 var dom_nodes = document.querySelectorAll( '.' + class_name ); 21 for ( var i = 0; i < dom_nodes.length; i++ ) { 22 dom_nodes[ i ].parentNode.removeChild( dom_nodes[ i ] ); 23 } 24} 25function wpcom_remote_login_final_cleanup() { 26 wpcom_remote_login_remove_dom_node_classes( "wpcom_remote_login_msg" ); 27 wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_key" ); 28 wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_validate" ); 29 wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_js" ); 30 wpcom_remote_login_remove_dom_node_id( "wpcom_request_access_iframe" ); 31 wpcom_remote_login_remove_dom_node_id( "wpcom_request_access_styles" ); 32} 33 34// Watch for messages back from the remote login 35window.addEventListener( "message", function( e ) { 36 if ( e.origin === "https://r-login.wordpress.com" ) { 37 var data = {}; 38 try { 39 data = JSON.parse( e.data ); 40 } catch( e ) { 41 wpcom_remote_login_final_cleanup(); 42 return; 43 } 44 45 if ( data.msg === 'LOGIN' ) { 46 // Clean up the login check iframe 47 wpcom_remote_login_remove_dom_node_id( "wpcom_remote_login_key" ); 48 49 var id_regex = new RegExp( /^[0-9]+$/ ); 50 var token_regex = new RegExp( /^.*|.*|.*$/ ); 51 if ( 52 token_regex.test( data.token ) 53 && id_regex.test( data.wpcomid ) 54 ) { 55 // We have everything we need to ask for a login 56 var script = document.createElement( "script" ); 57 script.setAttribute( "id", "wpcom_remote_login_validate" ); 58 script.src = '/remote-login.php?wpcom_remote_login=validate' 59 + '&wpcomid=' + data.wpcomid 60 + '&token=' + encodeURIComponent( data.token ) 61 + '&host=' + window.location.protocol 62 + '//' + window.location.hostname 63 + '&postid=5357' 64 + '&is_singular=1'; 65 document.body.appendChild( script ); 66 } 67 68 return; 69 } 70 71 // Safari ITP, not logged in, so redirect 72 if ( data.msg === 'LOGIN-REDIRECT' ) { 73 window.location = 'https://wordpress.com/log-in?redirect_to=' + window.location.href; 74 return; 75 } 76 77 // Safari ITP, storage access failed, remove the request 78 if ( data.msg === 'LOGIN-REMOVE' ) { 79 var css_zap = 'html { -webkit-transition: margin-top 1s; transition: margin-top 1s; } /* 9001 */ html { margin-top: 0 !important; } * html body { margin-top: 0 !important; } @media screen and ( max-width: 782px ) { html { margin-top: 0 !important; } * html body { margin-top: 0 !important; } }'; 80 var style_zap = document.createElement( 'style' ); 81 style_zap.type = 'text/css'; 82 style_zap.appendChild( document.createTextNode( css_zap ) ); 83 document.body.appendChild( style_zap ); 84 85 var e = document.getElementById( 'wpcom_request_access_iframe' ); 86 e.parentNode.removeChild( e ); 87 88 document.cookie = 'wordpress_com_login_access=denied; path=/; max-age=31536000'; 89 90 return; 91 } 92 93 // Safari ITP 94 if ( data.msg === 'REQUEST_ACCESS' ) { 95 console.log( 'request access: safari' ); 96 97 // Check ITP iframe enable/disable knob 98 if ( wpcom_remote_login_extra_auth !== 'safari_itp_iframe' ) { 99 return; 100 } 101 102 // If we are in a "private window" there is no ITP. 103 var private_window = false; 104 try { 105 var opendb = window.openDatabase( null, null, null, null ); 106 } catch( e ) { 107 private_window = true; 108 } 109 110 if ( private_window ) { 111 console.log( 'private window' ); 112 return; 113 } 114 115 var iframe = document.createElement( 'iframe' ); 116 iframe.id = 'wpcom_request_access_iframe'; 117 iframe.setAttribute( 'scrolling', 'no' ); 118 iframe.setAttribute( 'sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-top-navigation-by-user-activation' ); 119 iframe.src = 'https://r-login.wordpress.com/remote-login.php?wpcom_remote_login=request_access&origin=' + encodeURIComponent( data.origin ) + '&wpcomid=' + encodeURIComponent( data.wpcomid ); 120 121 var css = 'html { -webkit-transition: margin-top 1s; transition: margin-top 1s; } /* 9001 */ html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } @media screen and ( max-width: 660px ) { html { margin-top: 71px !important; } * html body { margin-top: 71px !important; } #wpcom_request_access_iframe { display: block; height: 71px !important; } } #wpcom_request_access_iframe { border: 0px; height: 46px; position: fixed; top: 0; left: 0; width: 100%; min-width: 100%; z-index: 99999; background: #23282d; } '; 122 123 var style = document.createElement( 'style' ); 124 style.type = 'text/css'; 125 style.id = 'wpcom_request_access_styles'; 126 style.appendChild( document.createTextNode( css ) ); 127 document.body.appendChild( style ); 128 129 document.body.appendChild( iframe ); 130 } 131 132 if ( data.msg === 'DONE' ) { 133 wpcom_remote_login_final_cleanup(); 134 } 135 } 136}, false ); 137 138// Inject the remote login iframe after the page has had a chance to load 139// more critical resources 140window.addEventListener( "DOMContentLoaded", function( e ) { 141 var iframe = document.createElement( "iframe" );
142 iframe.style.display = "none"; 143 iframe.setAttribute( "scrolling", "no" ); 144 iframe.setAttribute( "id", "wpcom_remote_login_key" ); 145 iframe.src = "https://r-login.wordpress.com/remote-login.php" 146 + "?wpcom_remote_login=key" 147 + "&origin=aHR0cHM6Ly9sZWFybi1wb3dlcnNoZWxsLm5ldA%3D%3D" 148 + "&wpcomid=15063622" 149 + "&time=" + Math.floor( Date.now() / 1000 ); 150 document.body.appendChild( iframe ); 151}, false ); 152</script>
152 153<link rel='dns-prefetch' href='//widgets.wp.com' /> 154<link rel='dns-prefetch' href='//s2.wp.com' /> 155<link rel='dns-prefetch' href='//s1.wp.com' /> 156<link rel='dns-prefetch' href='//s0.wp.com' /> 157<link rel="alternate" type="application/rss+xml" title="Learn Powershell | Achieve More » Feed" href="https://learn-powershell.net/feed/" /> 158<link rel="alternate" type="application/rss+xml" title="Learn Powershell | Achieve More » Comments Feed" href="https://learn-powershell.net/comments/feed/" /> 159<link rel="alternate" type="application/rss+xml" title="Learn Powershell | Achieve More » Quick Hits: Adding Items to an Array and a Look at Performance Comments Feed" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/feed/" /> 160
160<script type="text/javascript"> 161 /* <![CDATA[ */ 162 function addLoadEvent(func) { 163 var oldonload = window.onload; 164 if (typeof window.onload != 'function') { 165 window.onload = func; 166 } else { 167 window.onload = function () { 168 oldonload(); 169 func(); 170 } 171 } 172 } 173 /* ]]> */ 174 </script>
174 175 <style id="wp-img-auto-sizes-contain-inline-css"> 176img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px} 177/*# sourceURL=wp-img-auto-sizes-contain-inline-css */ 178</style> 179<link crossorigin='anonymous' rel='stylesheet' id='all-css-2-1' href='/_static/??-eJxtzN0KQEAQQOEXssaKcCHPsq1Jy+xPZjavL1JKLr86HTiSsjEIBgGfVaK8uMCwoiRjt8fAOYCPcyZk2JGM4KxSZPmotMwF/B/Jbfh+b1355EfdddWg26av1xMpeTR5&cssminify=yes' type='text/css' media='all' /> 180<style id="wp-emoji-styles-inline-css"> 181 182 img.wp-smiley, img.emoji { 183 display: inline !important; 184 border: none !important; 185 box-shadow: none !important; 186 height: 1em !important; 187 width: 1em !important; 188 margin: 0 0.07em !important; 189 vertical-align: -0.1em !important; 190 background: none !important; 191 padding: 0 !important; 192 } 193/*# sourceURL=wp-emoji-styles-inline-css */ 194</style> 195<style id="wp-block-library-inline-css"> 196:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;
196--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}:root .has-text-align-center{text-align:center}:root .has-text-align-left{text-align:left}:root .has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;padding:0;position:absolute;width:1px;word-break:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style^=border-color],[style*=";border-color"],[style*="; border-color"]){border-style:solid}html :where([style^=border-top-color],[style*=";border-top-color"],[style*="; border-top-color"]){border-top-style:solid}html :where([style^=border-right-color],[style*=";border-right-color"],[style*="; border-right-color"]){border-right-style:solid}html :where([style^=border-bottom-color],[style*=";border-bottom-color"],[style*="; border-bottom-color"]){border-bottom-style:solid}html :where([style^=border-left-color],[style*=";border-left-color"],[style*="; border-left-color"]){border-left-style:solid}html :where([style^=border-width],[style*=";border-width"],[style*="; border-width"]){border-style:solid}html :where([style^=border-top-width],[style*=";border-top-width"],[style*="; border-top-width"]){border-top-style:solid}html :where([style^=border-right-width],[style*=";border-right-width"],[style*="; border-right-width"]){border-right-style:solid}html :where([style^=border-bottom-width],[style*=";border-bottom-width"],[style*="; border-bottom-width"]){border-bottom-style:solid}html :where([style^=border-left-width],[style*=";border-left-width"],[style*="; border-left-width"]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}} 197 198/*# sourceURL=/wp-content/plugins/gutenberg-core/v24.1.0/build/styles/block-library/common.min.css */ 199</style> 200<style id="wp-block-library-inline-css-extra"> 201.has-text-align-justify { 202 text-align:justify; 203} 204.has-text-align-justify{text-align:justify;} 205/*# sourceURL=wp-block-library-inline-css */ 206</style> 207 208<style id="classic-theme-styles-inline-css"> 209.wp-block-button__link{background-color:#32373c;border-radius:9999px;box-shadow:none;color:#fff;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-file__button{background:#32373c;color:#fff}.wp-block-accordion-heading{margin:0}.wp-block-accordion-heading__toggle{background-color:inherit!important;color:inherit!important}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:focus,.wp-block-accordion-heading__toggle:hover{background-color:inherit!important;border:none;box-shadow:none;color:inherit;padding:var(--wp--preset--spacing--20,1em) 0;text-decoration:none}.wp-block-accordion-heading__toggle:focus-visible{outline:auto;outline-offset:0}.wp-block-tab:not(.has-text-color){color:inherit!important}.wp-block-tab:not(.has-background){background-color:inherit!important}.wp-block-tab:focus,.wp-block-tab:hover{text-decoration:none}.wp-block-tab:focus-visible{outline:auto;outline-offset:0} 210/*# sourceURL=/wp-content/plugins/gutenberg-core/v24.1.0/build/styles/block-library/classic.min.css */ 211</style> 212 213<style id="coblocks-inline-format-inline-css"> 214.uppercase{text-transform:uppercase} 215/*# sourceURL=coblocks-inline-format-inline-css */ 216</style> 217<link crossorigin='anonymous' rel='stylesheet' id='all-css-12-1' href='/_static/??-eJx9jcEKg0AMRH+oaVhorR7Eb9E16IpZg8min2889FZ6GYbhPQYPgbhlo2zIBWQtU8qKcdvJd5be0AmmMfW0Ejv2jKoP/K0daZzIXNdvB6PzvyJ+A8MgO6mCJ6fCYLN/6e113IZXU9WfUL/DcgHSTkDo&cssminify=yes' type='text/css' media='all' /> 218<style id="global-styles-inline-css"> 219:root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #fff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--blue: #0066cc;--wp--preset--color--medium-gray: #666;--wp--preset--color--light-gray: #f1f1f1;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgb(6,147,227) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgb(252,185,
2190) 0%,rgb(255,105,0) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgb(255,105,0) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--font-family--albert-sans: 'Albert Sans', sans-serif;--wp--preset--font-family--alegreya: Alegreya, serif;--wp--preset--font-family--arvo: Arvo, serif;--wp--preset--font-family--bodoni-moda: 'Bodoni Moda', serif;--wp--preset--font-family--bricolage-grotesque: 'Bricolage Grotesque', sans-serif;--wp--preset--font-family--cabin: Cabin, sans-serif;--wp--preset--font-family--chivo: Chivo, sans-serif;--wp--preset--font-family--commissioner: Commissioner, sans-serif;--wp--preset--font-family--cormorant: Cormorant, serif;--wp--preset--font-family--courier-prime: 'Courier Prime', monospace;--wp--preset--font-family--crimson-pro: 'Crimson Pro', serif;--wp--preset--font-family--dm-mono: 'DM Mono', monospace;--wp--preset--font-family--dm-sans: 'DM Sans', sans-serif;--wp--preset--font-family--dm-serif-display: 'DM Serif Display', serif;--wp--preset--font-family--domine: Domine, serif;--wp--preset--font-family--eb-garamond: 'EB Garamond', serif;--wp--preset--font-family--epilogue: Epilogue, sans-serif;--wp--preset--font-family--fahkwang: Fahkwang, sans-serif;--wp--preset--font-family--figtree: Figtree, sans-serif;--wp--preset--font-family--fira-sans: 'Fira Sans', sans-serif;--wp--preset--font-family--fjalla-one: 'Fjalla One', sans-serif;--wp--preset--font-family--fraunces: Fraunces, serif;--wp--preset--font-family--gabarito: Gabarito, system-ui;--wp--preset--font-family--ibm-plex-mono: 'IBM Plex Mono', monospace;--wp--preset--font-family--ibm-plex-sans: 'IBM Plex Sans', sans-serif;--wp--preset--font-family--ibarra-real-nova: 'Ibarra Real Nova', serif;--wp--preset--font-family--instrument-serif: 'Instrument Serif', serif;--wp--preset--font-family--inter: Inter, sans-serif;--wp--preset--font-family--josefin-sans: 'Josefin Sans', sans-serif;--wp--preset--font-family--jost: Jost, sans-serif;--wp--preset--font-family--libre-baskerville: 'Libre Baskerville', serif;--wp--preset--font-family--libre-franklin: 'Libre Franklin', sans-serif;--wp--preset--font-family--literata: Literata, serif;--wp--preset--font-family--lora: Lora, serif;--wp--preset--font-family--merriweather: Merriweather, serif;--wp--preset--font-family--montserrat: Montserrat, sans-serif;--wp--preset--font-family--newsreader: Newsreader, serif;--wp--preset--font-family--noto-sans-mono: 'Noto Sans Mono', sans-serif;--wp--preset--font-family--nunito: Nunito, sans-serif;--wp--preset--font-family--open-sans: 'Open Sans', sans-serif;--wp--preset--font-family--overpass: Overpass, sans-serif;--wp--preset--font-family--pt-serif: 'PT Serif', serif;--wp--preset--font-family--petrona: Petrona, serif;--wp--preset--font-family--piazzolla: Piazzolla, serif;--wp--preset--font-family--playfair-display: 'Playfair Display', serif;--wp--preset--font-family--plus-jakarta-sans: 'Plus Jakarta Sans', sans-serif;--wp--preset--font-family--poppins: Poppins, sans-serif;--wp--preset--font-family--raleway: Raleway, sans-serif;--wp--preset--font-family--roboto: Roboto, sans-serif;--wp--preset--font-family--roboto-slab: 'Roboto Slab', serif;--wp--preset--font-family--rubik: Rubik, sans-serif;--wp--preset--font-family--rufina: Rufina, serif;--wp--preset--font-family--sora: Sora, sans-serif;--wp--preset--font-family--source-sans-3: 'Source Sans 3', sans-serif;--wp--preset--font-family--source-serif-4: 'Source Serif 4', serif;--wp--preset--font-family--space-mono: 'Space Mono', monospace;--wp--preset--font-family--syne: Syne, sans-serif;--wp--preset--font-family--texturina: Texturina, serif;--wp--preset--font-family--urbanist: Urbanist, sans-serif;--wp--preset--font-family--work-sans: 'Work Sans', sans-serif;--wp--preset--text-shadow--light: 0.05em 0.05em 0.1em rgba(0, 0, 0, 0.3);--wp--preset--text-shadow--strong: 0.1em 0.1em 0.25em rgba(0, 0, 0, 0.5);--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0);--wp--preset--shadow--crisp: 6px 6px 0px rgb(0, 0, 0);}.wp-block-button{--wp--preset--dimension--25: 25%;--wp--preset--dimension--50: 50%;--wp--preset--dimension--75: 75%;--wp--preset--dimension--100: 100%;}:where(body) { margin: 0; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}body{padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;}:root :where(.wp-element-button, .wp-block-button__link){background-color: #32373c;border-width: 0;color: #fff;font-family: inherit;font-size: inherit;font-style: inherit;font-weight: inherit;letter-spacing: inherit;line-height: inherit;padding-top: calc(0.667em + 2px);padding-right: calc(1.333em + 2px);padding-bottom: calc(0.667em + 2px);padding-left: calc(1.333em + 2px);text-decoration: none;text-transform: inherit;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-blue-color{color: var(--wp--preset--color--blue) !important;}.has-medium-gray-color{color: var(--wp--preset--color--medium-gray) !important;}.has-light-gray-color{color: var(--wp--preset--color--light-gray) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-blue-background-color{background-color: var(--wp--preset--color--blue) !important;}.has-medium-gray-background-color{background-color: var(--wp--preset--color--medium-gray) !important;}.has-light-gray-background-color{background-color: var(--wp--preset--color--light-gray) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-blue-border-color{border-color: var(--wp--preset--color--blue) !important;}.has-medium-gray-border-color{border-color: var(--wp--preset--color--medium-gray) !important;}.has-light-gray-border-color{border-color: var(--wp--preset--color--light-gray) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}
219.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;}.has-albert-sans-font-family{font-family: var(--wp--preset--font-family--albert-sans) !important;}.has-alegreya-font-family{font-family: var(--wp--preset--font-family--alegreya) !important;}.has-arvo-font-family{font-family: var(--wp--preset--font-family--arvo) !important;}.has-bodoni-moda-font-family{font-family: var(--wp--preset--font-family--bodoni-moda) !important;}.has-bricolage-grotesque-font-family{font-family: var(--wp--preset--font-family--bricolage-grotesque) !important;}.has-cabin-font-family{font-family: var(--wp--preset--font-family--cabin) !important;}.has-chivo-font-family{font-family: var(--wp--preset--font-family--chivo) !important;}.has-commissioner-font-family{font-family: var(--wp--preset--font-family--commissioner) !important;}.has-cormorant-font-family{font-family: var(--wp--preset--font-family--cormorant) !important;}.has-courier-prime-font-family{font-family: var(--wp--preset--font-family--courier-prime) !important;}.has-crimson-pro-font-family{font-family: var(--wp--preset--font-family--crimson-pro) !important;}.has-dm-mono-font-family{font-family: var(--wp--preset--font-family--dm-mono) !important;}.has-dm-sans-font-family{font-family: var(--wp--preset--font-family--dm-sans) !important;}.has-dm-serif-display-font-family{font-family: var(--wp--preset--font-family--dm-serif-display) !important;}.has-domine-font-family{font-family: var(--wp--preset--font-family--domine) !important;}.has-eb-garamond-font-family{font-family: var(--wp--preset--font-family--eb-garamond) !important;}.has-epilogue-font-family{font-family: var(--wp--preset--font-family--epilogue) !important;}.has-fahkwang-font-family{font-family: var(--wp--preset--font-family--fahkwang) !important;}.has-figtree-font-family{font-family: var(--wp--preset--font-family--figtree) !important;}.has-fira-sans-font-family{font-family: var(--wp--preset--font-family--fira-sans) !important;}.has-fjalla-one-font-family{font-family: var(--wp--preset--font-family--fjalla-one) !important;}.has-fraunces-font-family{font-family: var(--wp--preset--font-family--fraunces) !important;}.has-gabarito-font-family{font-family: var(--wp--preset--font-family--gabarito) !important;}.has-ibm-plex-mono-font-family{font-family: var(--wp--preset--font-family--ibm-plex-mono) !important;}.has-ibm-plex-sans-font-family{font-family: var(--wp--preset--font-family--ibm-plex-sans) !important;}.has-ibarra-real-nova-font-family{font-family: var(--wp--preset--font-family--ibarra-real-nova) !important;}.has-instrument-serif-font-family{font-family: var(--wp--preset--font-family--instrument-serif) !important;}.has-inter-font-family{font-family: var(--wp--preset--font-family--inter) !important;}.has-josefin-sans-font-family{font-family: var(--wp--preset--font-family--josefin-sans) !important;}.has-jost-font-family{font-family: var(--wp--preset--font-family--jost) !important;}.has-libre-baskerville-font-family{font-family: var(--wp--preset--font-family--libre-baskerville) !important;}.has-libre-franklin-font-family{font-family: var(--wp--preset--font-family--libre-franklin) !important;}.has-literata-font-family{font-family: var(--wp--preset--font-family--literata) !important;}.has-lora-font-family{font-family: var(--wp--preset--font-family--lora) !important;}.has-merriweather-font-family{font-family: var(--wp--preset--font-family--merriweather) !important;}.has-montserrat-font-family{font-family: var(--wp--preset--font-family--montserrat) !important;}.has-newsreader-font-family{font-family: var(--wp--preset--font-family--newsreader) !important;}.has-noto-sans-mono-font-family{font-family: var(--wp--preset--font-family--noto-sans-mono) !important;}.has-nunito-font-family{font-family: var(--wp--preset--font-family--nunito) !important;}.has-open-sans-font-family{font-family: var(--wp--preset--font-family--open-sans) !important;}.has-overpass-font-family{font-family: var(--wp--preset--font-family--overpass) !important;}.has-pt-serif-font-family{font-family: var(--wp--preset--font-family--pt-serif) !important;}.has-petrona-font-family{font-family: var(--wp--preset--font-family--petrona) !important;}.has-piazzolla-font-family{font-family: var(--wp--preset--font-family--piazzolla) !important;}.has-playfair-display-font-family{font-family: var(--wp--preset--font-family--playfair-display) !important;}.has-plus-jakarta-sans-font-family{font-family: var(--wp--preset--font-family--plus-jakarta-sans) !important;}.has-poppins-font-family{font-family: var(--wp--preset--font-family--poppins) !important;}.has-raleway-font-family{font-family: var(--wp--preset--font-family--raleway) !important;}.has-roboto-font-family{font-family: var(--wp--preset--font-family--roboto) !important;}.has-roboto-slab-font-family{font-family: var(--wp--preset--font-family--roboto-slab) !important;}.has-rubik-font-family{font-family: var(--wp--preset--font-family--rubik) !important;}.has-rufina-font-family{font-family: var(--wp--preset--font-family--rufina) !important;}.has-sora-font-family{font-family: var(--wp--preset--font-family--sora) !important;}.has-source-sans-3-font-family{font-family: var(--wp--preset--font-family--source-sans-3) !important;}.has-source-serif-4-font-family{font-family: var(--wp--preset--font-family--source-serif-4) !important;}.has-space-mono-font-family{font-family: var(--wp--preset--font-family--space-mono) !important;}.has-syne-font-family{font-family: var(--wp--preset--font-family--syne) !important;}.has-texturina-font-family{font-family: var(--wp--preset--font-family--texturina) !important;}.has-urbanist-font-family{font-family: var(--wp--preset--font-family--urbanist) !important;}.has-work-sans-font-family{font-family: var(--wp--preset--font-family--work-sans) !important;}.has-light-text-shadow{text-shadow: var(--wp--preset--text-shadow--light) !important;}.has-strong-text-shadow{text-shadow: var(--wp--preset--text-shadow--strong) !important;} 220/*# sourceURL=global-styles-inline-css */ 221</style> 222 223<link crossorigin='anonymous' rel='stylesheet' id='all-css-14-1' href='/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/jetpack_vendor/automattic/jetpack-mu-wpcom/src/build/verbum-comments/verbum-comments.css?m=1790591968i&cssminify=yes' type='text/css' media='all' /> 224<link rel='stylesheet' id='verbum-gutenberg-css-css' href='https://widgets.wp.com/verbum-block-editor/block-editor.css?ver=1771405207' media='all' /> 225<link crossorigin='anonymous' rel='stylesheet' id='all-css-16-1' href='/_static/??-eJyFjsEOwjAMQ3+IECaxiR0Q37JVoRTaplpSVfv7hRsTEtxsy88ytgKOs1JW1AclEix1Rm0WrJbiHNm95OhEDvivK7pGglYcpy8gVSix+pAFF7JRb9KjtT7sL8gTg12ZNHDeGbjHKSxv9Jau3dCdzv3YX8bnBqh7UWU=&cssminify=yes' type='text/css' media='all' /> 226<style id="jetpack-global-styles-frontend-style-inline-css"> 227:root { --font-headings: unset; --font-base: unset; --font-headings-default: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; --font-base-default: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;} 228/*# sourceURL=jetpack-global-styles-frontend-style-inline-css */ 229</style> 230<link crossorigin='anonymous' rel='stylesheet' id='all-css-18-1' href='/_static/??-eJyNjcsKAjEMRX/ImhmUURfip0inLW3GNCmmQfx7H7gRN+7ugcs5cGsuCPfEHaq5RpaRFZbUmw+XD4MaQ5VolBS0+GuKPsb7eyLndVBdwd+iM3KA2ZAiqAT05Eiy6Bf8KHtJ9RkvW8gks6fX4VSP426/mQ7TMA7LA38FSqA=&cssminify=yes' type='text/css' media='all' />
231<script id="jetpack_related-posts-js-extra"> 232var related_posts_js_options = {"post_heading":"h4"}; 233//# sourceURL=jetpack_related-posts-js-extra 234</script>
vendor: 1 bytes, line 234
234
235<script id="wpcom-actionbar-placeholder-js-extra"> 236var actionbardata = {"siteID":"15063622","postID":"5357","siteURL":"https://learn-powershell.net","xhrURL":"https://learn-powershell.net/wp-admin/admin-ajax.php","nonce":"c8e53dc99c","isLoggedIn":"","statusMessage":"","subsEmailDefault":"instantly","proxyScriptUrl":"https://s0.wp.com/wp-content/js/wpcom-proxy-request.js?m=1513050504i&ver=20211021","shortlink":"https://wp.me/p11cJE-1op","i18n":{"followedText":"New posts from this site will now appear in your \u003Ca href=\"https://wordpress.com/reader\"\u003EReader\u003C/a\u003E","foldBar":"Collapse this bar","unfoldBar":"Expand this bar","shortLinkCopied":"Copied to clipboard."}}; 237//# sourceURL=wpcom-actionbar-placeholder-js-extra 238</script>
vendor: 1 bytes, line 238
238
239<script id="jetpack-mu-wpcom-settings-js-before"> 240var JETPACK_MU_WPCOM_SETTINGS = {"assetsUrl":"https://s1.wp.com/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/jetpack_vendor/automattic/jetpack-mu-wpcom/src/build/"}; 241//# sourceURL=jetpack-mu-wpcom-settings-js-before 242</script>
vendor: 1 bytes, line 242
242
243<script crossorigin='anonymous' type='text/javascript' src='/_static/??/wp-content/mu-plugins/jetpack-plugin/sun/_inc/build/related-posts/related-posts.min.js,/wp-content/js/rlt-proxy.js?m=1788794984j'></script>
vendor: 1 bytes, line 243
243
244<script id="rlt-proxy-js-after"> 245 rltInitialize( {"token":null,"iframeOrigins":["https:\/\/widgets.wp.com"]} ); 246//# sourceURL=rlt-proxy-js-after 247</script>
247 248<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://boeprox.wordpress.com/xmlrpc.php?rsd" /> 249<meta name="generator" content="WordPress.com" /> 250<link rel="canonical" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" /> 251<link rel='shortlink' href='https://wp.me/p11cJE-1op' /> 252<link rel="alternate" type="application/json+oembed" href="https://public-api.wordpress.com/oembed/?format=json&url=https%3A%2F%2Flearn-powershell.net%2F2014%2F09%2F21%2Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%2F&for=wpcom-auto-discovery" /><link rel="alternate" type="application/xml+oembed" href="https://public-api.wordpress.com/oembed/?format=xml&url=https%3A%2F%2Flearn-powershell.net%2F2014%2F09%2F21%2Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%2F&for=wpcom-auto-discovery" /> 253<!-- Jetpack Open Graph Tags --> 254<meta property="og:type" content="article" /> 255<meta property="og:title" content="Quick Hits: Adding Items to an Array and a Look at Performance" /> 256<meta property="og:url" content="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" /> 257<meta property="og:description" content="I had some comments on a recent performance comparison article that were well received and encouraged me to write some more of these similar articles. So without further ado, lets get started on loâ¦" />
258<meta property="article:published_time" content="2014-09-22T00:14:02+00:00" /> 259<meta property="article:modified_time" content="2014-09-23T11:10:09+00:00" /> 260<meta property="og:site_name" content="Learn Powershell | Achieve More" /> 261<meta property="og:image" content="https://learn-powershell.net/wp-content/uploads/2014/09/image_thumb16.png" /> 262<meta property="og:image:width" content="499" /> 263<meta property="og:image:height" content="171" /> 264<meta property="og:image:alt" content="image" /> 265<meta property="og:locale" content="en_US" /> 266<meta property="article:publisher" content="https://www.facebook.com/WordPresscom" /> 267<meta name="twitter:creator" content="@proxb" /> 268<meta name="twitter:site" content="@proxb" /> 269<meta name="twitter:text:title" content="Quick Hits: Adding Items to an Array and a Look at Performance" /> 270<meta name="twitter:image" content="https://learn-powershell.net/wp-content/uploads/2014/09/image_thumb16.png?w=640" /> 271<meta name="twitter:image:alt" content="image" /> 272<meta name="twitter:card" content="summary_large_image" /> 273 274<!-- End Jetpack Open Graph Tags --> 275<link rel="shortcut icon" type="image/x-icon" href="https://s1.wp.com/i/favicon.ico?m=1713425267i" sizes="16x16 24x24 32x32 48x48" /> 276<link rel="icon" type="image/x-icon" href="https://s1.wp.com/i/favicon.ico?m=1713425267i" sizes="16x16 24x24 32x32 48x48" /> 277<link rel="apple-touch-icon" href="https://s2.wp.com/i/webclip.png?m=1713868326i" /> 278<link rel='openid.server' href='https://learn-powershell.net/?openidserver=1' /> 279<link rel='openid.delegate' href='https://learn-powershell.net/' /> 280<link rel="search" type="application/opensearchdescription+xml" href="https://learn-powershell.net/osd.xml" title="Learn Powershell | Achieve More" /> 281<link rel="search" type="application/opensearchdescription+xml" href="https://s1.wp.com/opensearch.xml" title="WordPress.com" /> 282 <style type="text/css"> 283 .recentcomments a { 284 display: inline !important; 285 padding: 0 !important; 286 margin: 0 !important; 287 } 288 289 table.recentcommentsavatartop img.avatar, table.recentcommentsavatarend img.avatar { 290 border: 0px; 291 margin: 0; 292 } 293 294 table.recentcommentsavatartop a, table.recentcommentsavatarend a { 295 border: 0px !important; 296 background-color: transparent !important; 297 } 298 299 td.recentcommentsavatarend, td.recentcommentsavatartop { 300 padding: 0px 0px 1px 0px; 301 margin: 0px; 302 } 303 304 td.recentcommentstextend { 305 border: none !important; 306 padding: 0px 0px 2px 10px; 307 } 308 309 .rtl td.recentcommentstextend { 310 padding: 0px 10px 2px 0px; 311 } 312 313 td.recentcommentstexttop { 314 border: none; 315 padding: 0px 0px 0px 10px; 316 } 317 318 .rtl td.recentcommentstexttop { 319 padding: 0px 10px 0px 0px; 320 } 321 </style> 322 <meta name="description" content="I had some comments on a recent performance comparison article that were well received and encouraged me to write some more of these similar articles. So without further ado, lets get started on looking at adding items to an array and which approach would be better in terms of performance. Typically, the most common approach…" /> 323<link crossorigin='anonymous' rel='stylesheet' id='all-css-0-3' href='/_static/??-eJydzMEKwjAQBNAfMq5iQHsQP0Xqdilp0+zS2RD8exXUs3ibGYZHzQJrcSlOSw2W65gKaBK3nud3J9RC11SYbll5BqElk3XLwIZ+BhYdahYQ96tWSP5+PsOfXkvDKA5ytWCKZ4Lfs7y0y3LeH7vdKcbuEKcHvEhYtw==&cssminify=yes' type='text/css' media='all' /> 324<style id="jetpack-subscriptions-inline-css"> 325#subscribe-email input { 326 width: 95%; 327} 328 329.comment-subscription-form { 330 margin-bottom: 1em; 331} 332 333.comment-subscription-form .subscribe-label { 334 display: inline !important; 335} 336 337/* 338Text meant only for screen readers. 339Provides support for themes that do not bundle this CSS yet. 340@see https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/ 341***********************************/ 342.screen-reader-text { 343 border: 0; 344 clip-path: inset(50%); 345 height: 1px; 346 margin: -1px; 347 overflow: hidden; 348 padding: 0; 349 position: absolute !important; 350 width: 1px; 351 overflow-wrap: normal !important; 352} 353 354/*# sourceURL=/wp-content/mu-plugins/jetpack-plugin/sun/_inc/build/subscriptions/subscriptions.min.css */ 355</style> 356 357</head> 358 359<body class="wp-singular post-template-default single single-post postid-5357 single-format-standard wp-theme-pubtwentyten customizer-styles-applied single-author jetpack-reblog-enabled"> 360<div id="wrapper" class="hfeed"> 361 <div id="header"> 362 <div id="masthead"> 363 <div id="branding" role="banner"> 364 <div id="site-title"> 365 <span> 366 <a href="https://learn-powershell.net/" title="Learn Powershell | Achieve More" rel="home">Learn Powershell | Achieve More</a> 367 </span> 368 </div> 369 <div id="site-description">What is this Powershell of which you speak?</div> 370 371 <a class="home-link" href="https://learn-powershell.net/" title="Learn Powershell | Achieve More" rel="home">
372 <img src="https://boeprox.wordpress.com/wp-content/themes/pub/twentyten/images/headers/sunset.jpg?m=1610459589i" width="940" height="198" alt="" /> 373 </a> 374 </div><!-- #branding --> 375 376 <div id="access" role="navigation"> 377 <div class="skip-link screen-reader-text"><a href="#content" title="Skip to content">Skip to content</a></div> 378 <div class="menu"><ul> 379<li ><a href="https://learn-powershell.net/">Home</a></li><li class="page_item page-item-2"><a href="https://learn-powershell.net/about/">About</a></li> 380<li class="page_item page-item-1080"><a href="https://learn-powershell.net/articles/">Articles</a></li> 381<li class="page_item page-item-5015"><a href="https://learn-powershell.net/powershell-forum-directory/">PowerShell Forum Directory</a></li> 382<li class="page_item page-item-1085"><a href="https://learn-powershell.net/projects/">Projects</a></li> 383<li class="page_item page-item-2524"><a href="https://learn-powershell.net/publications/">Publications</a></li> 384<li class="page_item page-item-1088"><a href="https://learn-powershell.net/scripts/">Scripts</a></li> 385<li class="page_item page-item-1083"><a href="https://learn-powershell.net/speaking/">Speaking</a></li> 386</ul></div> 387 </div><!-- #access --> 388 </div><!-- #masthead --> 389 </div><!-- #header --> 390 391 <div id="main"> 392 393 <div id="container"> 394 <div id="content" role="main"> 395 396 397 398 <div id="nav-above" class="navigation"> 399 <div class="nav-previous"><a href="https://learn-powershell.net/2014/09/13/quick-hits-sending-data-to-null/" rel="prev"><span class="meta-nav">←</span> Quick Hits: Sending Data to Null</a></div> 400 <div class="nav-next"><a href="https://learn-powershell.net/2014/09/30/using-mutexes-to-write-data-to-the-same-logfile-across-processes-with-powershell/" rel="next">Using Mutexes to Write Data to the Same Logfile Across Processes With PowerShell <span class="meta-nav">→</span></a></div> 401 </div><!-- #nav-above --> 402 403 <div id="post-5357" class="post-5357 post type-post status-publish format-standard hentry category-powershell tag-array tag-arraylist tag-performance tag-powershell-2 tag-quickhits"> 404 <h2 class="entry-title"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" rel="bookmark">Quick Hits: Adding Items to an Array and a Look at Performance</a></h2> 405 <div class="entry-meta"> 406 <span class="meta-prep meta-prep-author">Posted on</span> <a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" title="7:14 pm" rel="bookmark"><span class="entry-date">September 21, 2014</span></a> <span class="meta-sep">by</span> <span class="author vcard"><a class="url fn n" href="https://learn-powershell.net/author/boeprox/" title="View all posts by Boe Prox">Boe Prox</a></span> </div><!-- .entry-meta --> 407 408 <div class="entry-content"> 409 <p>I had some comments on a recent performance comparison article that were well received and encouraged me to write some more of these similar articles. So without further ado, lets get started on looking at adding items to an array and which approach would be better in terms of performance.</p> 410<p>Typically, the most common approach that I see with adding items to an array in PowerShell is through the use of the <strong>+= </strong>operator.</p> 411<pre class="brush: powershell; title: ; notranslate" title=""> 412$a = @() 413$a += 'data' 414$a 415$a += 'test' 416$a 417</pre> 418<p><a href="https://learn-powershell.net/wp-content/uploads/2014/09/image16.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="image" src="https://learn-powershell.net/wp-content/uploads/2014/09/image_thumb16.png?w=499&h=171" alt="image" width="499" height="171" border="0" /></a></p> 419<p>I had to first initialize the array, otherwise my attempts to add the text would instead be treated as concatenating text, which is not what I am looking for in this example. As I said, this is the common approach that I see, but is it necessarily the fastest approach? Well, the answer is no.</p> 420<p><strong>Using an ArrayList</strong></p> 421<p>The answer to better performance is in the use of an <a href="http://msdn.microsoft.com/en-us
421/library/system.collections.arraylist(v=vs.110).aspx">ArrayList</a>. As you may see more and more with getting better performance out of PowerShell, you will typically see a move towards using some .Net instances to perform similar operations that can be done using actual PowerShell commands or operators. So something that I did above can be done like the following:</p> 422<pre class="brush: powershell; title: ; notranslate" title=""> 423$a = New-Object System.Collections.ArrayList 424$a.Add('data') 425$a.Add('test') 426$a 427</pre> 428<p><a href="https://learn-powershell.net/wp-content/uploads/2014/09/image17.png"><img style="background-image:none;padding-top:0;padding-left:0;display:inline;padding-right:0;border:0;" title="image" src="https://learn-powershell.net/wp-content/uploads/2014/09/image_thumb17.png?w=629&h=121" alt="image" width="629" height="121" border="0" /></a></p> 429<p>The 0 and 1 that you see being outputted each time I add an item indicates the index of which the item was added into the collection. So âdataâ was added at the 0 index and âtestâ was added to the 1 index. This can be pretty annoying in my opinion and can pollute the pipeline and bring undesirable results. You can get around this by making sure that <a href="https://learn-powershell.net/2014/09/13/quick-hits-sending-data-to-null/">data is sent to a Null location.</a></p> 430<p>We have two options for creating a collection of items set up before us, but the next question is which one is the quickest? Letâs find out!</p> 431<pre class="brush: powershell; title: ; notranslate" title=""> 432@(1E1,1E2,1E3,1E4,1E5) | ForEach { 433 $Time = (Measure-Command { 434 $array = @() 435 1..$_ | ForEach { 436 $array+=$_ 437 } 438 }).TotalMilliseconds 439 [pscustomobject]@{ 440 Type = '+=' 441 Time_ms = $Time 442 Count = $_ 443 } 444 445 $Time = (Measure-Command { 446 $list = New-Object System.Collections.ArrayList 447 1..$_ | ForEach { 448 [void]$list.Add($_) 449 } 450 }).TotalMilliseconds 451 [pscustomobject]@{ 452 Type = 'ArrayList' 453 Time_ms = $Time 454 Count = $_ 455 } 456} | Sort Count | Format-Table -AutoSize 457</pre> 458<p><a href="https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png"><img data-attachment-id="5380" data-permalink="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/2014-09-23_6-09-01/" data-orig-file="https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png" data-orig-size="235,174" data-comments-opened="1" data-image-title="2014-09-23_6-09-01" data-image-description="" data-image-caption="" data-large-file="https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png?w=235" class="alignnone size-full wp-image-5380" src="https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png?w=640" alt="2014-09-23_6-09-01" srcset="https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png 235w, https://learn-powershell.net/wp-content/uploads/2014/09/2014-09-23_6-09-01.png?w=150&h=111 150w" sizes="(max-width: 235px) 100vw, 235px" /></a></p> 459<p>Iâm not saying that ArrayList won every timeâ¦wait, I am saying that! As the total number of items added to each collection increased, the time also increased for each of the approaches with the += increasing rather dramatically near the end. What is happening with the += operator is that it actually builds out a new array each time you use the operator so it can add the new item to the collection. Not exactly efficient, but it gets the job done. You wonât find that with the ArrayList approach as it adds the item right into the collection.</p> 460<p>As with any of these types of performance tests, I covered the simple up the extreme type of situations, so if you absolutely want to squeeze every possible millisecond out of your PowerShell scripts, then you would definitely want to look at the ArrayList approach.</p> 461<div id="jp-post-flair" class="sharedaddy sd-like-enabled sd-sharing-enabled"><div class="sharedaddy sd-sharing-enabled"><div class="robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing"><h3 class="sd-title">Share this:</h3><div class="sd-content"><ul><li class="share-twitter"><a rel="nofollow noopener noreferrer" 462 data-shared="sharing-twitter-5357" 463 class="share-twitter sd-button share-icon" 464 href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?share=twitter" 465 target="_blank" 466 aria-labelledby="sharing-twitter-5357" 467 > 468 <span id="sharing-twitter-5357" hidden>Share on X (Opens in new window)</span> 469 <span>X</span> 470 </a></li><li class="share-facebook"><a rel="nofollow noopener noreferrer" 471 data-shared="sharing-facebook-5357" 472 class="share-facebook sd-button share-icon" 473 href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?share=facebook" 474 target="_blank" 475 aria-labelledby="sharing-facebook-5357" 476 > 477 <span id="sharing-facebook-5357" hidden>Share on Facebook (Opens in new window)</span> 478 <span>Facebook</span> 479 </a></li><li class="share-email"><a rel="nofollow noopener noreferrer" 480 data-shared="sharing-email-5357" 481 class="share-email sd-button share-icon" 482 href="mailto:?subject=%5BShared%20Post%5D%20Quick%20Hits%3A%20Adding%20Items%20to%20
482an%20Array%20and%20a%20Look%20at%20Performance&body=https%3A%2F%2Flearn-powershell.net%2F2014%2F09%2F21%2Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%2F&share=email" 483 target="_blank" 484 aria-labelledby="sharing-email-5357" 485 data-email-share-error-title="Do you have email set up?" data-email-share-error-text="If you're having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself." data-email-share-nonce="579cc1f4af" data-email-share-track-url="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?share=email"> 486 <span id="sharing-email-5357" hidden>Email a link to a friend (Opens in new window)</span> 487 <span>Email</span> 488 </a></li><li class="share-linkedin"><a rel="nofollow noopener noreferrer" 489 data-shared="sharing-linkedin-5357" 490 class="share-linkedin sd-button share-icon" 491 href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?share=linkedin" 492 target="_blank" 493 aria-labelledby="sharing-linkedin-5357" 494 > 495 <span id="sharing-linkedin-5357" hidden>Share on LinkedIn (Opens in new window)</span> 496 <span>LinkedIn</span> 497 </a></li><li class="share-reddit"><a rel="nofollow noopener noreferrer" 498 data-shared="sharing-reddit-5357" 499 class="share-reddit sd-button share-icon" 500 href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?share=reddit" 501 target="_blank" 502 aria-labelledby="sharing-reddit-5357" 503 > 504 <span id="sharing-reddit-5357" hidden>Share on Reddit (Opens in new window)</span> 505 <span>Reddit</span> 506 </a></li><li class="share-end"></li></ul></div></div></div><div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-15063622-5357-6abf56254e3a9' data-src='//widgets.wp.com/likes/index.html?ver=20261002#blog_id=15063622&post_id=5357&origin=boeprox.wordpress.com&obj_id=15063622-5357-6abf56254e3a9&domain=learn-powershell.net' data-name='like-post-frame-15063622-5357-6abf56254e3a9' data-title='Like or Reblog'><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height: 55px;'><span class='button'><span>Like</span></span> <span class='loading'>Loading...</span></div><span class='sd-text-color'></span><a class='sd-link-color'></a></div> 507<div id='jp-relatedposts' class='jp-relatedposts' > 508 <h3 class="jp-relatedposts-headline"><em>Related</em></h3> 509</div></div> </div><!-- .entry-content --> 510 511 512 <div class="entry-utility"> 513 This entry was posted in <a href="https://learn-powershell.net/category/powershell/" rel="category tag">powershell</a> and tagged <a href="https://learn-powershell.net/tag/array/" rel="tag">array</a>, <a href="https://learn-powershell.net/tag/arraylist/" rel="tag">arraylist</a>, <a href="https://learn-powershell.net/tag/performance/" rel="tag">performance</a>, <a href="https://learn-powershell.net/tag/powershell-2/" rel="tag">Powershell</a>, <a href="https://learn-powershell.net/tag/quickhits/" rel="tag">quickhits</a>. Bookmark the <a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" title="Permalink to Quick Hits: Adding Items to an Array and a Look at Performance" rel="bookmark">permalink</a>. </div><!-- .entry-utility --> 514 </div><!-- #post-5357 --> 515 516 <div id="nav-below" class="navigation"> 517 <div class="nav-previous"><a href="https://learn-powershell.net/2014/09/13/quick-hits-sending-data-to-null/" rel="prev"><span class="meta-nav">←</span> Quick Hits: Sending Data to Null</a></div> 518 <div class="nav-next"><a href="https://learn-powershell.net/2014/09/30/using-mutexes-to-write-data-to-the-same-logfile-across-processes-with-powershell/" rel="next">Using Mutexes to Write Data to the Same Logfile Across Processes With PowerShell <span class="meta-nav">→</span></a></div>
519 </div><!-- #nav-below --> 520 521 522 <div id="comments"> 523 524 525 <h3 id="comments-title"> 526 8 Responses to <em>Quick Hits: Adding Items to an Array and a Look at Performance</em> </h3> 527 528 529 <ol class="commentlist"> 530 <li class="comment byuser comment-author-jamesone111 even thread-even depth-1" id="li-comment-34311"> 531 <div id="comment-34311"> 532 <div class="comment-author vcard"> 533 <img referrerpolicy="no-referrer" alt='jamesone111's avatar' src='https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=60&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=80&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=120&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://0.gravatar.com/avatar/049b6173c68efeca43dc88c334987f734ae76f5a3f7ea472e3fabe9b1e3faf7f?s=160&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://gravatar.com/jamesone111" class="url" rel="ugc external nofollow">jamesone111</a></cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 534 535 536 537 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-34311"> 538 February 9, 2018 at 9:14 am</a> </div><!-- .comment-meta .commentmetadata --> 539 540 <div class="comment-body"><p>A late comment … it might be obvious, but it is not the data type but the operation which makes the difference.. you can declare a System.Collections.ArrayList and add items with += and the times are much the same as when you use += with the default array. When you use .Add() – which fails with fixed sized (default) arrays but works with System.Collections.ArrayList – THEN you get the speed up.</p> 541</div> 542 543 <div class="reply"> 544 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=34311#respond" data-commentid="34311" data-postid="5357" data-belowelement="comment-34311" data-respondelement="respond" data-replyto="Reply to jamesone111" aria-label="Reply to jamesone111">Reply</a> </div><!-- .reply --> 545 </div><!-- #comment-## --> 546 547 </li><!-- #comment-## --> 548 <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-18872"> 549 <div id="comment-18872"> 550 <div class="comment-author vcard"> 551 <img referrerpolicy="no-referrer" alt='kaynix's avatar' src='https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=60&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=80&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=120&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://0.gravatar.com/avatar/c05caf59a125fdc231b0ebb6b0202726e5c63a28b8f815c04dcf6314bdf0f3b2?s=160&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn">kaynix</cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 552 553 554 555 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-18872"> 556 March 20, 2015 at 4:57 pm</a> </div><!-- .comment-meta .commentmetadata --> 557 558 <div class="comment-body"><p>very interesting.<br /> 559could you also explain why when i filter multiple values in one column in excel, using powershell autofilter and then<br /> 560copy the result to another sheet<br /> 561my curent script will make the file get from 3mb to 250mb<br /> 562and if i copy the hole sheet it only 2mb bigger?</p> 563</div> 564 565 <div class="reply"> 566 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=18872#respond" data-commentid="18872" data-postid="5357" data-belowelement="comment-18872" data-respondelement="respond" data-replyto="Reply to kaynix" aria-label="Reply to kaynix">Reply</a> </div><!-- .reply --> 567 </div><!-- #comment-## --> 568 569 </li><!-- #comment-## --> 570 <li class="post pingback"> 571 <p>Pingback: <a href="https://learn-powershell.net/2014/10/17/looking-more-at-system-array-with-powershell/" class="url" rel="ugc">Looking More at System.Array With PowerShell | Learn Powershell | Achieve More</a></p> 572 </li><!-- #comment-## --> 573 <li class="comment even thread-even depth-1" id="li-comment-12031"> 574 <div id="comment-12031"> 575 <div class="comment-author vcard"> 576 <img referrerpolicy="no-referrer" alt='jonathan's avatar' src='https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=40&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=40&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=60&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=80&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=120&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://1.gravatar.com/avatar/4cd1cd385f37b273fbfa2d22657bc974b6ab7ed9efa647b1990c467d1a865508?s=160&d=https%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn">jonathan</cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 577 578 579 580 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-12031"> 581 September 24, 2014 at 5:55 am</a> </div><!-- .comment-meta .commentmetadata --> 582 583 <div class="comment-body"><p>Brilliant, Keep it up!</p> 584<p>Earlier you tested, which method of creating an object was fastest. Which actually made me convert much of a program i am currently working on. From using the New-Object to [Activator]::</p> 585<p>Turns out though, that the PS_ISE, cannot register the properties on a object made with the Activator ( intellisense ) however, made with New-Object, it could. It doesn’t matter much, because i use the MSDN page. But still relevant.</p> 586<p>
586I also kind-of stole bit of your code, to test which method of doing 2 things is fastest.<br /> 587Seems a bit silly, however i found it interesting to test. Join-path vs String Concatenation. String concatenation won.</p> 588<p>Sorry for rambling. ð</p> 589</div> 590 591 <div class="reply"> 592 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=12031#respond" data-commentid="12031" data-postid="5357" data-belowelement="comment-12031" data-respondelement="respond" data-replyto="Reply to jonathan" aria-label="Reply to jonathan">Reply</a> </div><!-- .reply --> 593 </div><!-- #comment-## --> 594 595 </li><!-- #comment-## --> 596 <li class="comment byuser comment-author-cantoriscomputing odd alt thread-odd thread-alt depth-1" id="li-comment-11771"> 597 <div id="comment-11771"> 598 <div class="comment-author vcard"> 599 <img referrerpolicy="no-referrer" alt='cantoris's avatar' src='https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=60&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=80&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=120&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=160&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://cantoriscomputing.wordpress.com" class="url" rel="ugc external nofollow">cantoris</a></cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 600 601 602 603 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-11771"> 604 September 22, 2014 at 4:00 am</a> </div><!-- .comment-meta .commentmetadata --> 605 606 <div class="comment-body"><p>Both interesting and useful, thanks.<br /> 607Evidence of the Array having to be re-made when you add to it can be seen here:<br /> 608@().IsFixedSize<br /> 609= $True<br /> 610(I see this is not the case for a hashtable.)</p> 611</div> 612 613 <div class="reply"> 614 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=11771#respond" data-commentid="11771" data-postid="5357" data-belowelement="comment-11771" data-respondelement="respond" data-replyto="Reply to cantoris" aria-label="Reply to cantoris">Reply</a> </div><!-- .reply --> 615 </div><!-- #comment-## --> 616 617 <ul class="children"> 618 <li class="comment byuser comment-author-cantoriscomputing even depth-2" id="li-comment-11773"> 619 <div id="comment-11773"> 620 <div class="comment-author vcard"> 621 <img referrerpolicy="no-referrer" alt='cantoris's avatar' src='https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=60&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=80&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=120&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://2.gravatar.com/avatar/e5c99475001d7b6d5ab8166cccefd02773e7a9d55ac92ab2c9cfe7c69b827d99?s=160&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn"><a href="http://cantoriscomputing.wordpress.com" class="url" rel="ugc external nofollow">cantoris</a></cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 622 623 624 625 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-11773"> 626 September 22, 2014 at 4:16 am</a> </div><!-- .comment-meta .commentmetadata --> 627 628 <div class="comment-body"><p>Also Interesting to see that an ArrayList has a Capacity property that starts at 4 (or 0 if the array is empty) and is doubled as required – so presumably a new ArrayList object is created each time you exceed the current one’
628s capacity. Vastly better than a new one on every addition though like with [Array].</p> 629</div> 630 631 <div class="reply"> 632 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=11773#respond" data-commentid="11773" data-postid="5357" data-belowelement="comment-11773" data-respondelement="respond" data-replyto="Reply to cantoris" aria-label="Reply to cantoris">Reply</a> </div><!-- .reply --> 633 </div><!-- #comment-## --> 634 635 </li><!-- #comment-## --> 636</ul><!-- .children --> 637</li><!-- #comment-## --> 638 <li class="comment odd alt thread-even depth-1" id="li-comment-11766"> 639 <div id="comment-11766"> 640 <div class="comment-author vcard"> 641 <img referrerpolicy="no-referrer" alt='Larry Weiss's avatar' src='https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=40&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=60&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=80&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=120&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://2.gravatar.com/avatar/81354bf161d956f36178866b835d3f94bcfc8311f1ef02679a5e4cb85232f9b7?s=160&d=https%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn">Larry Weiss</cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 642 643 644 645 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-11766"> 646 September 22, 2014 at 2:15 am</a> </div><!-- .comment-meta .commentmetadata --> 647 648 <div class="comment-body"><p>Please examine the time posted for the Count of 10 for the += Type<br /> 649It seems like a typo that it is so large a number compared with the Count of 100 for Type +=</p> 650</div> 651 652 <div class="reply"> 653 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=11766#respond" data-commentid="11766" data-postid="5357" data-belowelement="comment-11766" data-respondelement="respond" data-replyto="Reply to Larry Weiss" aria-label="Reply to Larry Weiss">Reply</a> </div><!-- .reply --> 654 </div><!-- #comment-## --> 655 656 <ul class="children"> 657 <li class="comment byuser comment-author-boeprox bypostauthor even depth-2" id="li-comment-11822"> 658 <div id="comment-11822"> 659 <div class="comment-author vcard"> 660 <img referrerpolicy="no-referrer" alt='Boe Prox's avatar' src='https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G' srcset='https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=40&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&r=G 1x, https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=60&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D60&r=G 1.5x, https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=80&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G 2x, https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=120&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D120&r=G 3x, https://0.gravatar.com/avatar/670ce564920e7b75e014180eca2e94e6b3d46ecce5edebf8d2033974a9cdfddd?s=160&d=https%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D160&r=G 4x' class='avatar avatar-40' height='40' width='40' loading='lazy' decoding='async' /> <cite class="fn"><a href="https://boeprox.wordpress.com" class="url" rel="ugc external nofollow">Boe Prox</a></cite> <span class="says">says:</span> </div><!-- .comment-author .vcard --> 661 662 663 664 <div class="comment-meta commentmetadata"><a href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comment-11822"> 665 September 22, 2014 at 8:13 pm</a> </div><!-- .comment-meta .commentmetadata --> 666 667 <div class="comment-body"><p>Yep, looks like something else was going on during that iteration. I re-ran it on one of my VMs and will update the picture. Thanks!</p> 668</div> 669 670 <div class="reply"> 671 <a rel="nofollow" class="comment-reply-link" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/?replytocom=11822#respond" data-commentid="11822" data-postid="5357" data-belowelement="comment-11822" data-respondelement="respond" data-replyto="Reply to Boe Prox" aria-label="Reply to Boe Prox">Reply</a> </div><!-- .reply --> 672 </div><!-- #comment-## --> 673 674 </li><!-- #comment-## --> 675</ul><!-- .children --> 676</li><!-- #comment-## --> 677 </ol> 678 679 680 681 682 <div id="respond" class="comment-respond"> 683 <h3 id="reply-title" class="comment-reply-title">Leave a comment <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#respond" style="display:none;">Cancel reply</a></small></h3><form action="https://learn-powershell.net/wp-comments-post.php" method="post" id="commentform" class="comment-form"> 684 685 686<div class="comment-form__verbum transparent"></div><div class="verbum-form-meta"><input type='hidden' name='comment_post_ID' value='5357' id='comment_post_ID' /> 687<input type='hidden' name='comment_parent' id='comment_parent' value='0' /> 688 689 <input type="hidden" name="highlander_comment_nonce" id="highlander_comment_nonce" value="fd41617cae" /> 690 <input type="hidden" name="verbum_show_subscription_modal" value="" /></div><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="c7ac8c904c" /></p><p style="display: none !important;" class="akismet-fields-container" data-prefix="ak_"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="150"/>
690<script> 691document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); 692</script>
692 693</p></form> </div><!-- #respond --> 694 695</div><!-- #comments --> 696 697 698 </div><!-- #content --> 699 </div><!-- #container --> 700 701 702 <div id="primary" class="widget-area" role="complementary"> 703 <ul class="xoxo"> 704 705<li id="media_image-3" class="widget-container widget_media_image"><h3 class="widget-title">Books</h3><style>.widget.widget_media_image { overflow: hidden; }.widget.widget_media_image img { height: auto; max-width: 100%; }</style><a href="http://www.manning.com/hicks/"><img class="image alignleft" src="http://www.manning.com/hicks/hicks_cover150.jpg" alt="" width="150" height="188" /></a></li><li id="text-11" class="widget-container widget_text"><h3 class="widget-title">Translate This Blog</h3> <div class="textwidget">Translate this blog into different languages... 706<br /> 707<br /> 708<a href="http://translate.google.com/translate?hl=en&langpair=en|ar&u=http://learn-powershell.net" title="Arabic">Ø§ÙØ¹Ø±Ø¨ÙØ©</a> 709<br /> 710<a href="http://translate.google.com/translate?hl=en&langpair=en|bg&u=http://learn-powershell.net" title="Bulgarian"> 711ÐÑлгаÑÑки</a> 712<br /> 713<a href="http://translate.google.com/translate?hl=en&langpair=en|zh-CN&u=http://learn-powershell.net" title="Chinese Simplified">䏿ï¼ç®ä½ï¼</a> 714<br /> 715<a href="http://translate.google.com/translate?hl=en&langpair=en|zh-TW&u=http://learn-powershell.net" title="Chinese Traditional">䏿ï¼ç¹é«ï¼</a> 716<br /> 717<a href="http://translate.google.com/translate?hl=en&langpair=en|hr&u=http://ismailimail.wordpress.com" title="Croatian">Hrvatski</a> 718<br /> 719<a href="http://translate.google.com/translate?hl=en&langpair=en|cs&u=http://learn-powershell.net" title="Czech">Äesky</a> 720<br /> 721<a href="http://translate.google.com/translate?hl=en&langpair=en|da&u=http://learn-powershell.net" title="Danish">Dansk</a> 722<br /> 723<a href="http://translate.google.com/translate?hl=en&langpair=en|nl&u=http://learn-powershell.net" title="Dutch">Nederlands</a> 724<br /> 725<a href="http://translate.google.com/translate?hl=en&langpair=en|fi&u=http://learn-powershell.net" title="Finnish">Suomi</a> 726<br /> 727<a href="http://translate.google.com/translate?hl=en&langpair=en|fr&u=http://learn-powershell.net" title="French">Français</a> 728<br /> 729<a href="http://translate.google.com/translate?hl=en&langpair=en|de&u=http://learn-powershell.net" title="German">Deutsch</a> 730<br /> 731<a href="http://translate.google.com/translate?hl=en&langpair=en|el&u=http://learn-powershell.net" title="Greek">Îλληνική</a> 732<br /> 733<a href="http://translate.google.com/translate?hl=en&langpair=en|hi&u=http://learn-powershell.net" title="Hindi"> 734हिनà¥à¤¦à¥</a> 735<br /> 736<a href="http://translate.google.com/translate?hl=en&langpair=en|it&u=http://learn-powershell.net" title="Italian"> 737Italiano</a> 738<br /> 739<a href="http://translate.google.com/translate?hl=en&langpair=en|ja&u=http://learn-powershell.net" title="Japanese"> 740æ¥æ¬èª</a> 741<br /> 742<a href="http://translate.google.com/translate?hl=en&langpair=en|ko&u=http://learn-powershell.net" title="Korean">íêµì´</a> 743<br /> 744<a href="http://translate.google.com/translate?hl=en&langpair=en|no&u=http://learn-powershell.net" title="Norwegian">Norsk</a> 745<br /> 746<a href="http://translate.google.com/translate?hl=en&langpair=en|po&u=http://learn-powershell.net" title="Polish">Polski</a> 747<br /> 748<a href="http://translate.google.com/translate?hl=en&langpair=en|pt&u=http://learn-powershell.net" title="Portuguese">Português</a> 749<br /> 750<a href="http://translate.google.com/translate?hl=en&langpair=en|ro&u=http://learn-powershell.net" title="Romanian">RomânÄ</a> 751<br /> 752<a href="http://translate.google.com/translate?hl=en&langpair=en|ru&u=http://learn-powershell.net" title="Russian"> 753Ð ÑÑÑкий</a> 754<br /> 755<a href="http://translate.google.com/translate?hl=en&langpair=en|es&u=http://learn-powershell.net" title="Spanish"> 756Español</a> 757<br /> 758<a href="http://translate.google.com/translate?hl=en&langpair=en|sv&u=http://learn-powershell.net" title="Swedish">Svenska</a></div> 759 </li><li id="search-2" class="widget-container widget_search"><form role="search" method="get" id="searchform" class="searchform" action="https://learn-powershell.net/"> 760 <div> 761 <label class="screen-reader-text" for="s">Search for:</label> 762 <input type="text" value="" name="s" id="s" /> 763 <input type="submit" id="searchsubmit" value="Search" /> 764 </div> 765 </form></li> 766 <li id="recent-posts-2" class="widget-container widget_recent_entries"> 767 <h3 class="widget-title">Recent Posts</h3> 768 <ul> 769 <li> 770 <a href="https://learn-powershell.net/2018/01/28/dealing-with-runspacepool-variable-scope-creep-in-powershell/">Dealing with Runspacepool Variable Scope Creep in PowerShell</a> 771 </li> 772 <li> 773 <a href="https://learn-powershell.net/2017/12/31/2018-powershell-resolutions/">2018 PowerShell Resolutions</a> 774 </li> 775 <li> 776 <a href="https://learn-powershell.net/2017/09/05/quick-hits-getting-the-local-computer-name/">Quick Hits: Getting the Local Computer Name</a> 777 </li> 778 <li> 779 <a href="https://learn-powershell.net/2017/07/31/recent-articles-on-mcpmag/">Recent Articles on MCPMag</a> 780 </li> 781 <li> 782 <a href="https://learn-powershell.net/2017/07/01/quick-hits-finding-all-hyperlinks-in-an-excel-workbook/">Quick Hits: Finding all Hyperlinks in an Excel Workbook</a> 783 </li> 784 </ul> 785 786 </li><li id="top-posts-3" class="widget-container widget_top-posts"><h3 class="widget-title">Top Posts</h3><ul><li><a href="https://learn-powershell.net/2011/02/21/querying-udp-ports-with-powershell/" class="bump-view" data-bump-view="tp">Querying UDP Ports with PowerShell</a></li><li><a href="https://learn-powershell.net/2014/06/24/changing-ownership-of-file-or-folder-using-powershell/" class="bump-view" data-bump-view="tp">Changing Ownership of File or Folder Using PowerShell</a></li><li><a href="https://learn-powershell.net/2011/06/12/fsmo-roles-and-powershell/" class="bump-view" data-bump-view="tp">FSMO Roles and PowerShell</a></li><li><a href="https://learn-powershell.net/2012/08/10/locating-mount-points-using-powershell/" class="bump-view" data-bump-view="tp">Locating Mount Points Using PowerShell</a></li><li><a href="https://learn-powershell.net/2016/04/22/speedy-ping-using-powershell/" class="bump-view" data-bump-view="tp">Speedy Ping using PowerShell</a></li><li><a href="https://learn-powershell.net/2011/02/11/using-powershell-to-query-web-site-information/" class="bump-view" data-bump-view="tp">Using PowerShell to Query Web Site Information</a></li><li>
786<a href="https://learn-powershell.net/2013/03/25/use-powershell-to-calculate-the-hash-of-a-file/" class="bump-view" data-bump-view="tp">Use PowerShell To Calculate the Hash of a File</a></li><li><a href="https://learn-powershell.net/2010/11/01/quick-hit-find-currently-logged-on-users/" class="bump-view" data-bump-view="tp">Quick-Hits: Find currently logged on users</a></li><li><a href="https://learn-powershell.net/2016/01/18/getting-the-icon-from-a-file-using-powershell/" class="bump-view" data-bump-view="tp">Getting the Icon from a File Using PowerShell</a></li><li><a href="https://learn-powershell.net/2011/01/31/quick-hits-ping-sweep-one-liner/" class="bump-view" data-bump-view="tp">Quick Hits: Ping Sweep One Liner</a></li></ul></li><li id="archives-2" class="widget-container widget_archive"><h3 class="widget-title">Archives</h3> <label class="screen-reader-text" for="archives-dropdown-2">Archives</label> 787 <select id="archives-dropdown-2" name="archive-dropdown"> 788 789 <option value="">Select Month</option> 790 <option value='https://learn-powershell.net/2018/01/'> January 2018 (1)</option> 791 <option value='https://learn-powershell.net/2017/12/'> December 2017 (1)</option> 792 <option value='https://learn-powershell.net/2017/09/'> September 2017 (1)</option> 793 <option value='https://learn-powershell.net/2017/07/'> July 2017 (2)</option> 794 <option value='https://learn-powershell.net/2017/05/'> May 2017 (2)</option> 795 <option value='https://learn-powershell.net/2017/04/'> April 2017 (1)</option> 796 <option value='https://learn-powershell.net/2017/02/'> February 2017 (2)</option> 797 <option value='https://learn-powershell.net/2017/01/'> January 2017 (1)</option> 798 <option value='https://learn-powershell.net/2016/12/'> December 2016 (2)</option> 799 <option value='https://learn-powershell.net/2016/11/'> November 2016 (2)</option> 800 <option value='https://learn-powershell.net/2016/10/'> October 2016 (2)</option> 801 <option value='https://learn-powershell.net/2016/09/'> September 2016 (2)</option> 802 <option value='https://learn-powershell.net/2016/08/'> August 2016 (3)</option> 803 <option value='https://learn-powershell.net/2016/07/'> July 2016 (2)</option> 804 <option value='https://learn-powershell.net/2016/06/'> June 2016 (2)</option> 805 <option value='https://learn-powershell.net/2016/05/'> May 2016 (2)</option> 806 <option value='https://learn-powershell.net/2016/04/'> April 2016 (3)</option> 807 <option value='https://learn-powershell.net/2016/03/'> March 2016 (3)</option> 808 <option value='https://learn-powershell.net/2016/02/'> February 2016 (2)</option> 809 <option value='https://learn-powershell.net/2016/01/'> January 2016 (3)</option> 810 <option value='https://learn-powershell.net/2015/12/'> December 2015 (3)</option> 811 <option value='https://learn-powershell.net/2015/11/'> November 2015 (3)</option> 812 <option value='https://learn-powershell.net/2015/10/'> October 2015 (5)</option> 813 <option value='https://learn-powershell.net/2015/09/'> September 2015 (3)</option> 814 <option value='https://learn-powershell.net/2015/08/'> August 2015 (3)</option> 815 <option value='https://learn-powershell.net/2015/07/'> July 2015 (2)</option> 816 <option value='https://learn-powershell.net/2015/06/'> June 2015 (3)</option> 817 <option value='https://learn-powershell.net/2015/05/'> May 2015 (4)</option> 818 <option value='https://learn-powershell.net/2015/04/'> April 2015 (3)</option> 819 <option value='https://learn-powershell.net/2015/03/'> March 2015 (5)</option> 820 <option value='https://learn-powershell.net/2015/02/'> February 2015 (4)</option> 821 <option value='https://learn-powershell.net/2015/01/'> January 2015 (3)</option> 822 <option value='https://learn-powershell.net/2014/12/'> December 2014 (4)</option> 823 <option value='https://learn-powershell.net/2014/11/'>
823 November 2014 (4)</option> 824 <option value='https://learn-powershell.net/2014/10/'> October 2014 (4)</option> 825 <option value='https://learn-powershell.net/2014/09/'> September 2014 (4)</option> 826 <option value='https://learn-powershell.net/2014/08/'> August 2014 (5)</option> 827 <option value='https://learn-powershell.net/2014/07/'> July 2014 (2)</option> 828 <option value='https://learn-powershell.net/2014/06/'> June 2014 (5)</option> 829 <option value='https://learn-powershell.net/2014/05/'> May 2014 (4)</option> 830 <option value='https://learn-powershell.net/2014/04/'> April 2014 (6)</option> 831 <option value='https://learn-powershell.net/2014/03/'> March 2014 (5)</option> 832 <option value='https://learn-powershell.net/2014/02/'> February 2014 (3)</option> 833 <option value='https://learn-powershell.net/2014/01/'> January 2014 (7)</option> 834 <option value='https://learn-powershell.net/2013/12/'> December 2013 (6)</option> 835 <option value='https://learn-powershell.net/2013/11/'> November 2013 (3)</option> 836 <option value='https://learn-powershell.net/2013/10/'> October 2013 (9)</option> 837 <option value='https://learn-powershell.net/2013/09/'> September 2013 (6)</option> 838 <option value='https://learn-powershell.net/2013/08/'> August 2013 (7)</option> 839 <option value='https://learn-powershell.net/2013/07/'> July 2013 (8)</option> 840 <option value='https://learn-powershell.net/2013/06/'> June 2013 (4)</option> 841 <option value='https://learn-powershell.net/2013/05/'> May 2013 (9)</option> 842 <option value='https://learn-powershell.net/2013/04/'> April 2013 (12)</option> 843 <option value='https://learn-powershell.net/2013/03/'> March 2013 (5)</option> 844 <option value='https://learn-powershell.net/2013/02/'> February 2013 (7)</option> 845 <option value='https://learn-powershell.net/2013/01/'> January 2013 (7)</option> 846 <option value='https://learn-powershell.net/2012/12/'> December 2012 (7)</option> 847 <option value='https://learn-powershell.net/2012/11/'> November 2012 (6)</option> 848 <option value='https://learn-powershell.net/2012/10/'> October 2012 (5)</option> 849 <option value='https://learn-powershell.net/2012/09/'> September 2012 (2)</option> 850 <option value='https://learn-powershell.net/2012/08/'> August 2012 (6)</option> 851 <option value='https://learn-powershell.net/2012/07/'> July 2012 (2)</option> 852 <option value='https://learn-powershell.net/2012/06/'> June 2012 (7)</option> 853 <option value='https://learn-powershell.net/2012/05/'> May 2012 (4)</option> 854 <option value='https://learn-powershell.net/2012/04/'> April 2012 (8)</option> 855 <option value='https://learn-powershell.net/2012/03/'> March 2012 (10)</option> 856 <option value='https://learn-powershell.net/2012/02/'> February 2012 (2)</option> 857 <option value='https://learn-powershell.net/2012/01/'> January 2012 (5)</option> 858 <option value='https://learn-powershell.net/2011/12/'> December 2011 (2)</option> 859 <option value='https://learn-powershell.net/2011/11/'> November 2011 (1)</option> 860 <option value='https://learn-powershell.net/2011/10/'> October 2011 (2)</option> 861 <option value='https://learn-powershell.net/2011/09/'> September 2011 (6)</option> 862 <option value='https://learn-powershell.net/2011/08/'> August 2011 (4)</option> 863 <option value='https://learn-powershell.net/2011/07/'> July 2011 (3)</option> 864 <option value='https://learn-powershell.net/2011/06/'> June 2011 (4)</option> 865 <option value='https://learn-powershell.net/2011/05/'> May 2011 (4)</option> 866 <option value='https://learn-powershell.net/2011/04/'> April 2011 (1)</option> 867 <option value='https://learn-powershell.net/2011/03/'> March 2011 (4)</option> 868 <option value='https://learn-powershell.net/2011/02/'> February 2011 (8)</option> 869 <option value='https://learn-powershell.net/2011/01/'> January 2011 (6)</option> 870 <option value='https://learn-powershell.net/2010/11/'> November 2010 (3)</option> 871 <option value='https://learn-powershell.net/2010/10/'> October 2010 (5)</option> 872 <option value='https://learn-powershell.net/2010/09/'> September 2010 (5)</option> 873 <option value='https://learn-powershell.net/2010/08/'> August 2010 (7)</option> 874 875 </select> 876 877
877<script> 878( ( dropdownId ) => { 879 const dropdown = document.getElementById( dropdownId ); 880 function onSelectChange() { 881 setTimeout( () => { 882 if ( 'escape' === dropdown.dataset.lastkey ) { 883 return; 884 } 885 if ( dropdown.value ) { 886 document.location.href = dropdown.value; 887 } 888 }, 250 ); 889 } 890 function onKeyUp( event ) { 891 if ( 'Escape' === event.key ) { 892 dropdown.dataset.lastkey = 'escape'; 893 } else { 894 delete dropdown.dataset.lastkey; 895 } 896 } 897 function onClick() { 898 delete dropdown.dataset.lastkey; 899 } 900 dropdown.addEventListener( 'keyup', onKeyUp ); 901 dropdown.addEventListener( 'click', onClick ); 902 dropdown.addEventListener( 'change', onSelectChange ); 903})( "archives-dropdown-2" ); 904 905//# sourceURL=WP_Widget_Archives%3A%3Awidget 906</script>
906 907</li><li id="categories-2" class="widget-container widget_categories"><h3 class="widget-title">Categories</h3><form action="https://learn-powershell.net" method="get"><label class="screen-reader-text" for="cat">Categories</label><select name='cat' id='cat' class='postform'> 908 <option value='-1'>Select Category</option> 909 <option class="level-0" value="162381199">2013 Scripting Games Judges Notes</option> 910 <option class="level-0" value="238274551">Debug</option> 911 <option class="level-0" value="282714">Deep Dive</option> 912 <option class="level-0" value="7744666">Excel</option> 913 <option class="level-0" value="7168">GUI</option> 914 <option class="level-0" value="31428">Modules</option> 915 <option class="level-0" value="103">News</option> 916 <option class="level-0" value="315">Office</option> 917 <option class="level-0" value="19743086">PowerCLI</option> 918 <option class="level-0" value="178495">powershell</option> 919 <option class="level-0" value="56726985">Scripting Games 2011</option> 920 <option class="level-0" value="82426987">Scripting Games 2012</option> 921 <option class="level-0" value="159555771">Scripting Games 2013</option> 922 <option class="level-0" value="4493">scripts</option> 923 <option class="level-0" value="10346">SQL</option> 924 <option class="level-0" value="456880">Tech-Ed</option> 925 <option class="level-0" value="10118394">Tips</option> 926 <option class="level-0" value="1">Uncategorized</option> 927 <option class="level-0" value="31441">V3</option> 928 <option class="level-0" value="694088">V4</option> 929 <option class="level-0" value="23664898">V5</option> 930 <option class="level-0" value="38600">VMWare</option> 931 <option class="level-0" value="205592021">Winter Scripting Games 2014</option> 932 <option class="level-0" value="46652">WPF</option> 933 <option class="level-0" value="347217">WSUS</option> 934</select> 935</form>
935<script> 936( ( dropdownId ) => { 937 const dropdown = document.getElementById( dropdownId ); 938 function onSelectChange() { 939 setTimeout( () => { 940 if ( 'escape' === dropdown.dataset.lastkey ) { 941 return; 942 } 943 if ( dropdown.value && parseInt( dropdown.value ) > 0 && dropdown instanceof HTMLSelectElement ) { 944 dropdown.parentElement.submit(); 945 } 946 }, 250 ); 947 } 948 function onKeyUp( event ) { 949 if ( 'Escape' === event.key ) { 950 dropdown.dataset.lastkey = 'escape'; 951 } else { 952 delete dropdown.dataset.lastkey; 953 } 954 } 955 function onClick() { 956 delete dropdown.dataset.lastkey; 957 } 958 dropdown.addEventListener( 'keyup', onKeyUp ); 959 dropdown.addEventListener( 'click', onClick ); 960 dropdown.addEventListener( 'change', onSelectChange ); 961})( "cat" ); 962 963//# sourceURL=WP_Widget_Categories%3A%3Awidget 964</script>
964 965</li><li id="wp_tag_cloud-2" class="widget-container wp_widget_tag_cloud"><h3 class="widget-title"></h3><ul class='wp-tag-cloud' role='list'> 966 <li><a href="https://learn-powershell.net/tag/net/" class="tag-cloud-link tag-link-2427 tag-link-position-1" style="font-size: 11.5pt;" aria-label=".net (11 items)">.net</a></li> 967 <li><a href="https://learn-powershell.net/tag/api/" class="tag-cloud-link tag-link-4276 tag-link-position-2" style="font-size: 10.916666666667pt;" aria-label="api (9 items)">api</a></li> 968 <li><a href="https://learn-powershell.net/tag/array/" class="tag-cloud-link tag-link-271798 tag-link-position-3" style="font-size: 9.3125pt;" aria-label="array (5 items)">array</a></li> 969 <li><a href="https://learn-powershell.net/tag/background-jobs/" class="tag-cloud-link tag-link-3008794 tag-link-position-4" style="font-size: 8pt;" aria-label="background jobs (3 items)">background jobs</a></li> 970 <li><a href="https://learn-powershell.net/tag/binary/" class="tag-cloud-link tag-link-11687 tag-link-position-5" style="font-size: 8pt;" aria-label="binary (3 items)">binary</a></li> 971 <li><a href="https://learn-powershell.net/tag/book/" class="tag-cloud-link tag-link-2364 tag-link-position-6" style="font-size: 9.3125pt;" aria-label="book (5 items)">book</a></li> 972 <li><a href="https://learn-powershell.net/tag/c/" class="tag-cloud-link tag-link-2426 tag-link-position-7" style="font-size: 8pt;" aria-label="c# (3 items)">c#</a></li> 973 <li><a href="https://learn-powershell.net/tag/clock/" class="tag-cloud-link tag-link-124955 tag-link-position-8" style="font-size: 8pt;" aria-label="clock (3 items)">clock</a></li> 974 <li><a href="https://learn-powershell.net/tag/codeplex/" class="tag-cloud-link tag-link-340183 tag-link-position-9" style="font-size: 8.7291666666667pt;" aria-label="codeplex (4 items)">codeplex</a></li> 975 <li><a href="https://learn-powershell.net/tag/com-object/" class="tag-cloud-link tag-link-12382550 tag-link-position-10" style="font-size: 10.552083333333pt;" aria-label="com object (8 items)">com object</a></li> 976 <li><a href="https://learn-powershell.net/tag/convert/" class="tag-cloud-link tag-link-208932 tag-link-position-11" style="font-size: 8pt;" aria-label="convert (3 items)">convert</a></li> 977 <li><a href="https://learn-powershell.net/tag/ctp/" class="tag-cloud-link tag-link-103778 tag-link-position-12" style="font-size: 8pt;" aria-label="CTP (3 items)">CTP</a></li> 978 <li><a href="https://learn-powershell.net/tag/database/" class="tag-cloud-link tag-link-475 tag-link-position-13" style="font-size: 8.7291666666667pt;" aria-label="database (4 items)">database</a></li> 979 <li><a href="https://learn-powershell.net/tag/deep-dive-2/" class="tag-cloud-link tag-link-56726987 tag-link-position-14" style="font-size: 8pt;" aria-label="deep dive (3 items)">deep dive</a></li> 980 <li><a href="https://learn-powershell.net/tag/excel/" class="tag-cloud-link tag-link-25398 tag-link-position-15" style="font-size: 10.1875pt;" aria-label="excel (7 items)">excel</a></li> 981 <li><a href="https://learn-powershell.net/tag/favorites/" class="tag-cloud-link tag-link-1722 tag-link-position-16" style="font-size: 8.7291666666667pt;" aria-label="Favorites (4 items)">Favorites</a></li> 982 <li><a href="https://learn-powershell.net/tag/function/" class="tag-cloud-link tag-link-188922 tag-link-position-17" style="font-size: 8.7291666666667pt;" aria-label="function (4 items)">function</a></li> 983 <li><a href="https://learn-powershell.net/tag/groups/" class="tag-cloud-link tag-link-36381 tag-link-position-18" style="font-size: 8.7291666666667pt;" aria-label="groups (4 items)">groups</a></li> 984 <li><a href="https://learn-powershell.net/tag/guest-blog/" class="tag-cloud-link tag-link-279350 tag-link-position-19" style="font-size: 12.375pt;" aria-label="guest blog (15 items)">guest blog</a></li> 985 <li><a href="https://learn-powershell.net/tag/hash-table/" class="tag-cloud-link tag-link-8332934 tag-link-position-20" style="font-size: 9.3125pt;" aria-label="hash table (5 items)">hash table</a></li> 986 <li><a href="https://learn-powershell.net/tag/internet-explorer/" class="tag-cloud-link tag-link-1143 tag-link-position-21" style="font-size: 8.7291666666667pt;" aria-label="Internet Explorer (4 items)">Internet Explorer</a></li> 987 <li><a href="https://learn-powershell.net/tag/ise/" class="tag-cloud-link tag-link-936037 tag-link-position-22" style="font-size: 8pt;" aria-label="ise (3 items)">ise</a></li> 988 <li><a href="https://learn-powershell.net/tag/mcpmag/" class="tag-cloud-link tag-link-295613547 tag-link-position-23" style="font-size: 10.1875pt;" aria-label="mcpmag (7 items)">mcpmag</a></li> 989 <li><a href="https://learn-powershell.net/tag/module/" class="tag-cloud-link tag-link-82179 tag-link-position-24" style="font-size: 11.5pt;" aria-label="module (11 items)">module</a></li> 990 <li><a href="https://learn-powershell.net/tag/mvp/" class="tag-cloud-link tag-link-224713 tag-link-position-25" style="font-size: 8.7291666666667pt;" aria-label="MVP (4 items)">MVP</a></li> 991 <li><a href="https://learn-powershell.net/tag/network/" class="tag-cloud-link tag-link-3385 tag-link-position-26" style="font-size: 9.3125pt;" aria-label="network (5 items)">network</a></li> 992 <li><a href="https://learn-powershell.net/tag/news-2/" class="tag-cloud-link tag-link-75292 tag-link-position-27" style="font-size: 11.5pt;" aria-label="news (11 items)">news</a></li> 993 <li><a href="https://learn-powershell.net/tag/parameter/" class="tag-cloud-link tag-link-1076292 tag-link-position-28" style="font-size: 8.7291666666667pt;" aria-label="parameter (4 items)">parameter</a></li> 994 <li><a href="https://learn-powershell.net/tag/patches/" class="tag-cloud-link tag-link-18592 tag-link-position-29" style="font-size: 9.3125pt;" aria-label="patches (5 items)">
994patches</a></li> 995 <li><a href="https://learn-powershell.net/tag/performance/" class="tag-cloud-link tag-link-1930 tag-link-position-30" style="font-size: 10.1875pt;" aria-label="performance (7 items)">performance</a></li> 996 <li><a href="https://learn-powershell.net/tag/pinvoke/" class="tag-cloud-link tag-link-4101631 tag-link-position-31" style="font-size: 12.8125pt;" aria-label="pinvoke (17 items)">pinvoke</a></li> 997 <li><a href="https://learn-powershell.net/tag/podcast/" class="tag-cloud-link tag-link-1142 tag-link-position-32" style="font-size: 8pt;" aria-label="podcast (3 items)">podcast</a></li> 998 <li><a href="https://learn-powershell.net/tag/port/" class="tag-cloud-link tag-link-39250 tag-link-position-33" style="font-size: 8pt;" aria-label="port (3 items)">port</a></li> 999 <li><a href="https://learn-powershell.net/tag/poshchat/" class="tag-cloud-link tag-link-81513807 tag-link-position-34" style="font-size: 9.3125pt;" aria-label="PoshChat (5 items)">PoshChat</a></li> 1000 <li><a href="https://learn-powershell.net/tag/poshpaig/" class="tag-cloud-link tag-link-58351177 tag-link-position-35" style="font-size: 10.1875pt;" aria-label="poshpaig (7 items)">poshpaig</a></li> 1001 <li><a href="https://learn-powershell.net/tag/poshrsjob/" class="tag-cloud-link tag-link-341123221 tag-link-position-36" style="font-size: 10.552083333333pt;" aria-label="PoshRSJob (8 items)">PoshRSJob</a></li> 1002 <li><a href="https://learn-powershell.net/tag/poshwsus/" class="tag-cloud-link tag-link-73351354 tag-link-position-37" style="font-size: 9.8229166666667pt;" aria-label="poshwsus (6 items)">poshwsus</a></li> 1003 <li><a href="https://learn-powershell.net/tag/powercli-2/" class="tag-cloud-link tag-link-42002190 tag-link-position-38" style="font-size: 8pt;" aria-label="powercli (3 items)">powercli</a></li> 1004 <li><a href="https://learn-powershell.net/tag/powerscripting/" class="tag-cloud-link tag-link-64081042 tag-link-position-39" style="font-size: 8pt;" aria-label="powerscripting (3 items)">powerscripting</a></li> 1005 <li><a href="https://learn-powershell.net/tag/powershell-2/" class="tag-cloud-link tag-link-35175609 tag-link-position-40" style="font-size: 22pt;" aria-label="Powershell (328 items)">Powershell</a></li> 1006 <li><a href="https://learn-powershell.net/tag/printers/" class="tag-cloud-link tag-link-22527 tag-link-position-41" style="font-size: 8pt;" aria-label="printers (3 items)">printers</a></li> 1007 <li><a href="https://learn-powershell.net/tag/quickhits/" class="tag-cloud-link tag-link-1046424 tag-link-position-42" style="font-size: 13.6875pt;" aria-label="quickhits (23 items)">quickhits</a></li> 1008 <li><a href="https://learn-powershell.net/tag/reflection/" class="tag-cloud-link tag-link-8408 tag-link-position-43" style="font-size: 12.010416666667pt;" aria-label="reflection (13 items)">reflection</a></li> 1009 <li><a href="https://learn-powershell.net/tag/regex/" class="tag-cloud-link tag-link-54025 tag-link-position-44" style="font-size: 8.7291666666667pt;" aria-label="regex (4 items)">regex</a></li> 1010 <li><a href="https://learn-powershell.net/tag/registry/" class="tag-cloud-link tag-link-51535 tag-link-position-45" style="font-size: 9.3125pt;" aria-label="registry (5 items)">registry</a></li> 1011 <li><a href="https://learn-powershell.net/tag/regular-expressions/" class="tag-cloud-link tag-link-44443 tag-link-position-46" style="font-size: 8.7291666666667pt;" aria-label="Regular Expressions (4 items)">Regular Expressions</a></li> 1012 <li><a href="https://learn-powershell.net/tag/report/" class="tag-cloud-link tag-link-17573 tag-link-position-47" style="font-size: 9.8229166666667pt;" aria-label="report (6 items)">report</a></li> 1013 <li><a href="https://learn-powershell.net/tag/resolution/" class="tag-cloud-link tag-link-33088 tag-link-position-48" style="font-size: 8.7291666666667pt;" aria-label="resolution (4 items)">resolution</a></li> 1014 <li><a href="https://learn-powershell.net/tag/runspace/" class="tag-cloud-link tag-link-45355343 tag-link-position-49" style="font-size: 13.104166666667pt;" aria-label="runspace (19 items)">runspace</a></li> 1015 <li><a href="https://learn-powershell.net/tag/runspaces/" class="tag-cloud-link tag-link-81067037 tag-link-position-50" style="font-size: 8.7291666666667pt;" aria-label="runspaces (4 items)">runspaces</a></li> 1016 <li><a href="https://learn-powershell.net/tag/scripting-games-2012-2/" class="tag-cloud-link tag-link-82456428 tag-link-position-51" style="font-size: 11.5pt;" aria-label="scripting games 2012 (11 items)">scripting games 2012</a></li> 1017 <li><a href="https://learn-powershell.net/tag/scripting-games-2013-2/" class="tag-cloud-link tag-link-162720700 tag-link-position-52" style="font-size: 11.71875pt;" aria-label="scripting games 2013 (12 items)">scripting games 2013</a></li> 1018 <li><a href="https://learn-powershell.net/tag/scripting-guy/" class="tag-cloud-link tag-link-12865021 tag-link-position-53" style="font-size: 12.958333333333pt;" aria-label="scripting guy (18 items)">scripting guy</a></li> 1019 <li><a href="https://learn-powershell.net/tag/scripts/" class="tag-cloud-link tag-link-4493 tag-link-position-54" style="font-size: 8.7291666666667pt;" aria-label="scripts (4 items)">scripts</a></li> 1020 <li><a href="https://learn-powershell.net/tag/smo/" class="tag-cloud-link tag-link-43500 tag-link-position-55" style="font-size: 9.3125pt;" aria-label="SMO (5 items)">SMO</a></li> 1021 <li><a href="https://learn-powershell.net/tag/speaker/" class="tag-cloud-link tag-link-134896 tag-link-position-56" style="font-size: 10.552083333333pt;" aria-label="Speaker (8 items)">Speaker</a></li> 1022 <li><a href="https://learn-powershell.net/tag/speaking/" class="tag-cloud-link tag-link-39484 tag-link-position-57" style="font-size: 9.3125pt;" aria-label="speaking (5 items)">speaking</a></li> 1023 <li><a href="https://learn-powershell.net/tag/sql/" class="tag-cloud-link tag-link-10346 tag-link-position-58" style="font-size: 12.375pt;" aria-label="SQL (15 items)">SQL</a></li> 1024 <li><a href="https://learn-powershell.net/tag/tcp/" class="tag-cloud-link tag-link-129845 tag-link-position-59" style="font-size: 9.3125pt;" aria-label="tcp (5 items)">tcp</a></li> 1025 <li><a href="https://learn-powershell.net/tag/tips/" class="tag-cloud-link tag-link-1788 tag-link-position-60" style="font-size: 12.375pt;" aria-label="tips (15 items)">tips</a></li> 1026 <li><a href="https://learn-powershell.net/tag/tsql/" class="tag-cloud-link tag-link-477470 tag-link-position-61" style="font-size: 8.7291666666667pt;" aria-label="tsql (4 items)">tsql</a></li> 1027 <li><a href="https://learn-powershell.net/tag/updates/" class="tag-cloud-link tag-link-1171 tag-link-position-62" style="font-size: 9.8229166666667pt;" aria-label="updates (6 items)">updates</a></li> 1028 <li>
1028<a href="https://learn-powershell.net/tag/user-group/" class="tag-cloud-link tag-link-110515 tag-link-position-63" style="font-size: 10.1875pt;" aria-label="user group (7 items)">user group</a></li> 1029 <li><a href="https://learn-powershell.net/tag/v3/" class="tag-cloud-link tag-link-31441 tag-link-position-64" style="font-size: 9.8229166666667pt;" aria-label="V3 (6 items)">V3</a></li> 1030 <li><a href="https://learn-powershell.net/tag/v4/" class="tag-cloud-link tag-link-694088 tag-link-position-65" style="font-size: 9.3125pt;" aria-label="V4 (5 items)">V4</a></li> 1031 <li><a href="https://learn-powershell.net/tag/v5/" class="tag-cloud-link tag-link-31442 tag-link-position-66" style="font-size: 9.8229166666667pt;" aria-label="v5 (6 items)">v5</a></li> 1032 <li><a href="https://learn-powershell.net/tag/weather/" class="tag-cloud-link tag-link-4494 tag-link-position-67" style="font-size: 8pt;" aria-label="weather (3 items)">weather</a></li> 1033 <li><a href="https://learn-powershell.net/tag/widget/" class="tag-cloud-link tag-link-1368 tag-link-position-68" style="font-size: 8pt;" aria-label="widget (3 items)">widget</a></li> 1034 <li><a href="https://learn-powershell.net/tag/win32api/" class="tag-cloud-link tag-link-6135402 tag-link-position-69" style="font-size: 10.916666666667pt;" aria-label="win32API (9 items)">win32API</a></li> 1035 <li><a href="https://learn-powershell.net/tag/winter-scriting-games-2014/" class="tag-cloud-link tag-link-205592024 tag-link-position-70" style="font-size: 8.7291666666667pt;" aria-label="winter scriting games 2014 (4 items)">winter scriting games 2014</a></li> 1036 <li><a href="https://learn-powershell.net/tag/wmi/" class="tag-cloud-link tag-link-178506 tag-link-position-71" style="font-size: 11.5pt;" aria-label="wmi (11 items)">wmi</a></li> 1037 <li><a href="https://learn-powershell.net/tag/word/" class="tag-cloud-link tag-link-162 tag-link-position-72" style="font-size: 8.7291666666667pt;" aria-label="word (4 items)">word</a></li> 1038 <li><a href="https://learn-powershell.net/tag/wpf/" class="tag-cloud-link tag-link-46652 tag-link-position-73" style="font-size: 14.708333333333pt;" aria-label="WPF (32 items)">WPF</a></li> 1039 <li><a href="https://learn-powershell.net/tag/wsus-2/" class="tag-cloud-link tag-link-41379570 tag-link-position-74" style="font-size: 14.489583333333pt;" aria-label="wsus (30 items)">wsus</a></li> 1040 <li><a href="https://learn-powershell.net/tag/xaml/" class="tag-cloud-link tag-link-103962 tag-link-position-75" style="font-size: 9.3125pt;" aria-label="xaml (5 items)">xaml</a></li> 1041</ul> 1042</li> </ul> 1043 </div><!-- #primary .widget-area --> 1044 1045 1046 <div id="secondary" class="widget-area" role="complementary"> 1047 <ul class="xoxo"> 1048 <li id="blog_subscription-3" class="widget-container widget_blog_subscription jetpack_subscription_widget"><h3 class="widget-title"><label for="subscribe-field">Email Subscription</label></h3> 1049 1050 <div class="wp-block-jetpack-subscriptions__container"> 1051 <form 1052 action="https://subscribe.wordpress.com" 1053 method="post" 1054 accept-charset="utf-8" 1055 data-blog="15063622" 1056 data-post_access_level="everybody" 1057 id="subscribe-blog" 1058 > 1059 <p>Enter your email address to subscribe to this blog and receive notifications of new posts by email.</p> 1060 <p id="subscribe-email"> 1061 <label 1062 id="subscribe-field-label" 1063 for="subscribe-field" 1064 class="screen-reader-text" 1065 > 1066 Email Address: </label> 1067 1068 <input 1069 type="email" 1070 name="email" 1071 autocomplete="email" 1072 1073 style="width: 95%; padding: 1px 10px" 1074 placeholder="Email Address" 1075 value="" 1076 id="subscribe-field" 1077 required 1078 /> </p> 1079 1080 <p id="subscribe-submit" 1081 > 1082 <input type="hidden" name="action" value="subscribe"/> 1083 <input type="hidden" name="blog_id" value="15063622"/> 1084 <input type="hidden" name="source" value="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/"/> 1085 <input type="hidden" name="sub-type" value="widget"/> 1086 <input type="hidden" name="redirect_fragment" value="subscribe-blog"/> 1087 <input type="hidden" id="_wpnonce" name="_wpnonce" value="df0c2c26ac" /> <button type="submit" 1088 class="wp-block-button__link" 1089 > 1090 Sign me up! </button> 1091 </p> 1092 </form> 1093 <div class="wp-block-jetpack-subscriptions__subscount"> 1094 Join 486 other subscribers </div> 1095 </div> 1096 1097</li><li id="blog-stats-2" class="widget-container widget_blog-stats"><h3 class="widget-title">Blog Stats</h3> <ul> 1098 <li>5,856,528 Visitors Since August 5, 2010</li> 1099 </ul> 1100 </li><li id="meta-2" class="widget-container widget_meta"><h3 class="widget-title">Meta</h3> 1101 <ul> 1102 <li><a class="click-register" href="https://wordpress.com/start?ref=wplogin">Create account</a></li> <li>
1102<a href="https://boeprox.wordpress.com/wp-login.php">Log in</a></li> 1103 <li><a href="https://learn-powershell.net/feed/">Entries feed</a></li> 1104 <li><a href="https://learn-powershell.net/comments/feed/">Comments feed</a></li> 1105 1106 <li><a href="https://wordpress.com/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.com</a></li> 1107 </ul> 1108 1109 </li> </ul> 1110 </div><!-- #secondary .widget-area --> 1111 1112 </div><!-- #main --> 1113 1114 <div id="footer" role="contentinfo"> 1115 <div id="colophon"> 1116 1117 1118 1119 <div id="footer-widget-area" role="complementary"> 1120 1121 <div id="first" class="widget-area"> 1122 <ul class="xoxo"> 1123 <li id="text-12" class="widget-container widget_text"> <div class="textwidget"></div> 1124 </li> </ul> 1125 </div><!-- #first .widget-area --> 1126 1127 1128 1129 1130 </div><!-- #footer-widget-area --> 1131 1132 <div id="site-info"> 1133 <a href="https://learn-powershell.net/" title="Learn Powershell | Achieve More" rel="home"> 1134 Learn Powershell | Achieve More </a> 1135 </div><!-- #site-info --> 1136 1137 <div id="site-generator"> 1138 <a href="https://wordpress.com/?ref=footer_blog" rel="nofollow">Blog at WordPress.com.</a> 1139 </div><!-- #site-generator --> 1140 1141 </div><!-- #colophon --> 1142 </div><!-- #footer --> 1143 1144</div><!-- #wrapper --> 1145 1146<!-- -->
1147<script type="speculationrules"> 1148{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/files/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/pub/twentyten/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]} 1149</script>
vendor: 1 bytes, line 1149
1149
1150<script id="grofiles-cards-js" src="//0.gravatar.com/js/hovercards/hovercards.min.js?ver=202640d1133547e8a1f2801609f51cef12522abe7f6647d869e9fbc974fe356a37e613"></script>
vendor: 1 bytes, line 1150
1150
1151<script id="wpgroho-js-extra"> 1152var WPGroHo = {"my_hash":""}; 1153//# sourceURL=wpgroho-js-extra 1154</script>
vendor: 1 bytes, line 1154
1154
1155<script crossorigin='anonymous' type='text/javascript' src='/wp-content/mu-plugins/gravatar-hovercards/wpgroho.js?m=1610363240i'></script>
1155 1156 1157
1157<script> 1158 // Initialize and attach hovercards to all gravatars 1159 ( function() { 1160 function init() { 1161 if ( typeof Gravatar === 'undefined' ) { 1162 return; 1163 } 1164 1165 if ( typeof Gravatar.init !== 'function' ) { 1166 return; 1167 } 1168 1169 Gravatar.profile_cb = function ( hash, id ) { 1170 WPGroHo.syncProfileData( hash, id ); 1171 }; 1172 1173 Gravatar.my_hash = WPGroHo.my_hash; 1174 Gravatar.init( 1175 'body', 1176 '#wp-admin-bar-my-account', 1177 { 1178 i18n: { 1179 'Edit your profile â': 'Edit your profile â', 1180 'View profile â': 'View profile â', 1181 'Contact': 'Contact', 1182 'Send money': 'Send money', 1183 'Sorry, we are unable to load this Gravatar profile.': 'Sorry, we are unable to load this Gravatar profile.', 1184 'Gravatar not found.': 'Gravatar not found.', 1185 'Too Many Requests.': 'Too Many Requests.', 1186 'Internal Server Error.': 'Internal Server Error.', 1187 'Is this you?': 'Is this you?', 1188 'Claim your free profile.': 'Claim your free profile.', 1189 'Email': 'Email', 1190 'Home Phone': 'Home Phone', 1191 'Work Phone': 'Work Phone', 1192 'Cell Phone': 'Cell Phone', 1193 'Contact Form': 'Contact Form', 1194 'Calendar': 'Calendar', 1195 }, 1196 } 1197 ); 1198 } 1199 1200 if ( document.readyState !== 'loading' ) { 1201 init(); 1202 } else { 1203 document.addEventListener( 'DOMContentLoaded', init ); 1204 } 1205 } )(); 1206 </script>
1206 1207 1208 <div style="display:none"> 1209 <div class="grofile-hash-map-256a9fa9cbef2fc1e3230fb3797360b9"> 1210 </div> 1211 <div class="grofile-hash-map-ec1f3898254b2f052639a2823a8573cb"> 1212 </div> 1213 <div class="grofile-hash-map-7b97287ea8965e862b9a96d3503c817c"> 1214 </div> 1215 <div class="grofile-hash-map-3628569e396843d971884afa9ec8f447"> 1216 </div> 1217 <div class="grofile-hash-map-9899b6544a388774fbf25a949452fe58"> 1218 </div> 1219 <div class="grofile-hash-map-3bde2094c84fb81661c04ed87f8336b7"> 1220 </div> 1221 </div> 1222 <div id="actionbar" dir="ltr" style="display: none;" 1223 class="actnbr-pub-twentyten" role="region" aria-label="Site actions"> 1224 <span class="actnbr-live" aria-live="polite"></span> 1225 <ul> 1226 <li class="actnbr-btn"> 1227 <a class="actnbr-action actnbr-actn-comment" href="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/#comments"> 1228 <svg class="actnbr-icon actnbr-icon-comment" width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path d="M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"/></svg> <span>Comment </span> 1229 </a> 1230 </li> 1231 <li class="actnbr-btn"> 1232 <a class="actnbr-action actnbr-actn-reblog" href="" role="button"> 1233 <svg class="actnbr-icon actnbr-icon-reusable-block" width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path d="M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"/></svg><span>Reblog</span> 1234 </a> 1235 </li> 1236 <li class="actnbr-btn actnbr-hidden"> 1237 <a class="actnbr-action actnbr-actn-follow " href="" role="button" aria-haspopup="dialog" aria-expanded="false"> 1238 <svg class="actnbr-icon actnbr-icon-bell" width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 11.5c0 1.353.17 2.368.976 3 .266.209.602.376 1.024.5v1H5v-1c.422-.124.757-.291 1.024-.5.806-.632.976-1.647.976-3V9c0-2.8 2.2-5 5-5s5 2.2 5 5v2.5ZM15.5 9v2.5c0 .93.066 1.98.515 2.897l.053.103H7.932a4.018 4.018 0 0 0 .053-.103c.449-.917.515-1.967.515-2.897V9c0-1.972 1.528-3.5 3.5-3.5s3.5 1.528 3.5 3.5Zm-5.492 9.008c0-.176.023-.346.065-.508h3.854A1.996 1.996 0 0 1 12 20c-1.1 0-1.992-.892-1.992-1.992Z"/></svg> <span>Subscribe</span> 1239 </a> 1240 <a class="actnbr-action actnbr-actn-following no-display" href="" role="button"> 1241 <svg class="actnbr-icon actnbr-icon-check" width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" style="fill: none" stroke="currentColor" stroke-width="1.5"><path d="M7 12L10 15L17 8" vector-effect="non-scaling-stroke"/></svg> <span>Subscribed</span> 1242 </a> 1243 <div class="actnbr-popover actnbr-panel actnbr-notice" id="follow-bubble" role="dialog" aria-label="Subscribe to Learn Powershell | Achieve More"> 1244 <div class="actnbr-follow-bubble"> 1245 <div class="actnbr-panel__group"><a class="actnbr-menu__item actnbr-sitename" href="https://learn-powershell.net"><img loading='lazy' alt='' src='https://s-ssl.wordpress.com/i/logo/wpcom-gray-white.png?m=1479929237i' srcset='https://s-ssl.wordpress.com/i/logo/wpcom-gray-white.png 1x' class='avatar avatar-50' height='50' width='50' /><span class="actnbr-menu__label">Learn Powershell | Achieve More</span></a></div> <div class="actnbr-panel__group"> 1246 <div class="actnbr-message no-display" aria-live="polite"></div> 1247 <form method="post" action="https://subscribe.wordpress.com" accept-charset="utf-8" class="no-display"> 1248 <div class="actnbr-follow-count">Join 486 other subscribers</div> 1249 <input type="email" name="email" placeholder="Want updates? Enter your email" class="actnbr-email-field" aria-label="Email address" /> 1250 <input type="hidden" name="action" value="subscribe" /> 1251 <input type="hidden" name="blog_id" value="15063622" /> 1252 <input type="hidden" name="source" value="https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" /> 1253 <input type="hidden" name="sub-type" value="actionbar-follow" /> 1254 <input type="hidden" id="_wpnonce" name="_wpnonce" value="df0c2c26ac" /> <button type="submit" class="actnbr-button">Sign me up</button> 1255 </form> 1256 <p class="actnbr-login-nudge"> 1257 Have a WordPress.com account? <a href="https://wordpress.com/log-in?redirect_to=https%3A%2F%2Fr-login.wordpress.com%2Fremote-login.php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Flearn-powershell.net%252F2014%252F09%252F21%252Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%252F">Log in now.</a> </p> 1258 </div> 1259 </div> 1260 </div> 1261 </li> 1262 <li class="actnbr-ellipsis actnbr-hidden"> 1263 <button type="button" class="actnbr-more-toggle" aria-haspopup="true" aria-expanded="false" aria-label="More options"> 1264 <svg class="actnbr-icon actnbr-icon-more-horizontal" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path d="M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"/></svg> </button> 1265 <div class="actnbr-popover actnbr-menu" role="menu" aria-label="Site options"> 1266 <div class="actnbr-menu__group" role="group"><a role="menuitem" class="actnbr-menu__item actnbr-sitename" href="https://learn-powershell.net"><img loading='lazy' alt='' src='https://s-ssl.wordpress.com/i/logo/wpcom-gray-white.png?m=1479929237i' srcset='https://s-ssl.wordpress.com/i/logo/wpcom-gray-white.png 1x' class='avatar avatar-50' height='50' width='50' /><span class="actnbr-menu__label">Learn Powershell | Achieve More</span></a></div><div class="actnbr-menu__group" role="group"><a role="menuitem" class="actnbr-menu__item actnbr-shortlink" href="https://wp.me/p11cJE-1op"><span class="actnbr-menu__label actnbr-shortlink__text">Copy shortlink</span><span class="actnbr-menu__icon actnbr-shortlink__icon"><svg class="actnbr-icon actnbr-icon-copy" width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"/></svg></span><span class="actnbr-menu__icon actnbr-shortlink__icon-copied"><svg class="actnbr-icon actnbr-icon-check" width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" style="fill: none" stroke="currentColor" stroke-width="1.5"><path d="M7 12L10 15L17 8" vector-effect="non-scaling-stroke"/></svg></span></a><a role="menuitem" class="actnbr-menu__item actnbr-reader" href="https://wordpress.com/reader/blogs/15063622/posts/5357"><span class="actnbr-menu__label">View post in Reader</span></a></div><div class="actnbr-menu__group" role="group"><a role="menuitem" class="actnbr-menu__item actnbr-subs" href="https://subscribe.wordpress.com/"><span class="actnbr-menu__label">Manage subscriptions</span></a><a role="menuitem" class="actnbr-menu__item actnbr-signup" href="https://wordpress.com/start/"><span class="actnbr-menu__label">Sign up</span></a><a role="menuitem" class="actnbr-menu__item actnbr-login" href="https://wordpress.com/log-in?redirect_to=https%3A%2F%2Fr-login.wordpress.com%2Fremote-login.php%3Faction%3Dlink%26back%3Dhttps%253A%252F%252Flearn-powershell.net%252F2014%252F09%252F21%252Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%252F"><span class="actnbr-menu__label">Log in</span></a></div><div class="actnbr-menu__group" role="group"><a role="menuitem" class="actnbr-menu__item flb-report" href="https://wordpress.com/abuse/?report_url=https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/" target="_blank" rel="noopener noreferrer"><span class="actnbr-menu__label">Report this content</span><span class="actnbr-menu__icon"><svg class="actnbr-icon actnbr-icon-external" width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" fill="currentColor"><path d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"/></svg></span></a></div><div class="actnbr-menu__group" role="group"><a role="menuitem" class="actnbr-menu__item actnbr-fold" href=""><span class="actnbr-menu__label">Collapse this bar</span></a></div> </div> 1267 </li> 1268 </ul> 1269 </div> 1270
1270<script> 1271window.addEventListener( "DOMContentLoaded", function () { 1272 var link = document.createElement( "link" ); 1273 link.href = "\/wp-content\/mu-plugins\/jetpack-plugin\/sun\/jetpack_vendor\/automattic\/jetpack-newsletter\/src\/..\/build\/action-bar.css?ver=33ad88c8b02f7d5bc6d2"; 1274 link.rel = "stylesheet"; 1275 document.head.appendChild( link ); 1276 1277 var script = document.createElement( "script" ); 1278 script.src = "\/wp-content\/mu-plugins\/jetpack-plugin\/sun\/jetpack_vendor\/automattic\/jetpack-newsletter\/src\/..\/build\/action-bar.js?ver=33ad88c8b02f7d5bc6d2"; 1279 document.body.appendChild( script ); 1280 } ); 1281</script>
1281 1282<link rel="prefetch" href="/wp-content/mu-plugins/jetpack-plugin/sun/_inc/blocks/swiper.js" as="script" /> 1283 <div id="jp-carousel-loading-overlay" style="display: none;"> 1284 <div id="jp-carousel-loading-wrapper"> 1285 <span id="jp-carousel-library-loading"><svg class="jetpack-spinner" width="40" height="40" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><circle cx="50" cy="50" r="46" fill="none" stroke="#ddd" stroke-width="8"/><path d="M 50 4 A 46 46 0 0 1 96 50" fill="none" stroke="currentColor" stroke-width="8" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1.4s" from="0 50 50" to="360 50 50" repeatCount="indefinite"/></path></svg></span> 1286 </div> 1287 </div> 1288 <div class="jp-carousel-overlay" style="display: none;"> 1289 1290 <div class="jp-carousel-container"> 1291 <!-- The Carousel Swiper --> 1292 <div 1293 class="jp-carousel-wrap swiper jp-carousel-swiper-container jp-carousel-transitions" 1294 itemscope 1295 itemtype="https://schema.org/ImageGallery"> 1296 <div class="jp-carousel swiper-wrapper"></div> 1297 <div class="jp-swiper-button-prev swiper-button-prev"> 1298 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1299 <mask id="maskPrev" mask-type="alpha" maskUnits="userSpaceOnUse" x="8" y="6" width="9" height="12"> 1300 <path d="M16.2072 16.59L11.6496 12L16.2072 7.41L14.8041 6L8.8335 12L14.8041 18L16.2072 16.59Z" fill="white"/> 1301 </mask> 1302 <g mask="url(#maskPrev)"> 1303 <rect x="0.579102" width="23.8823" height="24" fill="#FFFFFF"/> 1304 </g> 1305 </svg> 1306 </div> 1307 <div class="jp-swiper-button-next swiper-button-next"> 1308 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1309 <mask id="maskNext" mask-type="alpha" maskUnits="userSpaceOnUse" x="8" y="6" width="8" height="12"> 1310 <path d="M8.59814 16.59L13.1557 12L8.59814 7.41L10.0012 6L15.9718 12L10.0012 18L8.59814 16.59Z" fill="white"/> 1311 </mask> 1312 <g mask="url(#maskNext)"> 1313 <rect x="0.34375" width="23.8822" height="24" fill="#FFFFFF"/> 1314 </g> 1315 </svg> 1316 </div> 1317 </div> 1318 <!-- The main close buton --> 1319 <div class="jp-carousel-close-hint"> 1320 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1321 <mask id="maskClose" mask-type="alpha" maskUnits="userSpaceOnUse" x="5" y="5" width="15" height="14"> 1322 <path d="M19.3166 6.41L17.9135 5L12.3509 10.59L6.78834 5L5.38525 6.41L10.9478 12L5.38525 17.59L6.78834 19L12.3509 13.41L17.9135 19L19.3166 17.59L13.754 12L19.3166 6.41Z" fill="white"/> 1323 </mask> 1324 <g mask="url(#maskClose)"> 1325 <rect x="0.409668" width="23.8823" height="24" fill="#FFFFFF"/> 1326 </g> 1327 </svg> 1328 </div> 1329 <!-- Image info, comments and meta --> 1330 <div class="jp-carousel-info"> 1331 <div class="jp-carousel-info-footer"> 1332 <div class="jp-carousel-pagination-container"> 1333 <div class="jp-swiper-pagination swiper-pagination"></div> 1334 <div class="jp-carousel-pagination"></div> 1335 </div> 1336 <div class="jp-carousel-photo-title-container"> 1337 <div class="jp-carousel-photo-caption"></div> 1338 </div> 1339 <div class="jp-carousel-photo-icons-container"> 1340 <a href="#" class="jp-carousel-icon-btn jp-carousel-icon-info" aria-label="Toggle photo metadata visibility"> 1341 <span class="jp-carousel-icon"> 1342 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1343 <mask id="maskInfo" mask-type="alpha" maskUnits="userSpaceOnUse" x="2" y="2" width="21" height="20"> 1344 <path fill-rule="evenodd" clip-rule="evenodd" d="M12.7537 2C7.26076 2 2.80273 6.48 2.80273 12C2.80273 17.52 7.26076 22 12.7537 22C18.2466 22 22.7046 17.52 22.7046 12C22.7046 6.48 18.2466 2 12.7537 2ZM11.7586 7V9H13.7488V7H11.7586ZM11.7586 11V17H13.7488V11H11.7586ZM4.79292 12C4.79292 16.41 8.36531 20 12.7537 20C17.142 20 20.7144 16.41 20.7144 12C20.7144 7.59 17.142 4 12.7537 4C8.36531 4 4.79292 7.59 4.79292 12Z" fill="white"/> 1345 </mask> 1346 <g mask="url(#maskInfo)"> 1347 <rect x="0.8125" width="23.8823" height="24" fill="#FFFFFF"/> 1348 </g> 1349 </svg> 1350 </span> 1351 </a> 1352 <a href="#" class="jp-carousel-icon-btn jp-carousel-icon-comments" aria-label="Toggle photo comments visibility"> 1353 <span class="jp-carousel-icon"> 1354 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1355 <mask id="maskComments" mask-type="alpha" maskUnits="userSpaceOnUse" x="2" y="2" width="21" height="20"> 1356 <path fill-rule="evenodd" clip-rule="evenodd" d="M4.3271 2H20.2486C21.3432 2 22.2388 2.9 22.2388 4V16C22.2388 17.1 21.3432 18 20.2486 18H6.31729L2.33691 22V4C2.33691 2.9 3.2325 2 4.3271 2ZM6.31729 16H20.2486V4H4.3271V18L6.31729 16Z" fill="white"/> 1357 </mask> 1358 <g mask="url(#maskComments)"> 1359 <rect x="0.34668" width="23.8823" height="24" fill="#FFFFFF"/> 1360 </g> 1361 </svg> 1362 1363 <span class="jp-carousel-has-comments-indicator" aria-label="This image has comments."></span> 1364 </span> 1365 </a> 1366 </div>
1367 </div> 1368 <div class="jp-carousel-info-extra"> 1369 <div class="jp-carousel-info-content-wrapper"> 1370 <div class="jp-carousel-photo-title-container"> 1371 <div class="jp-carousel-photo-title"></div> 1372 </div> 1373 <div class="jp-carousel-comments-wrapper"> 1374 <div id="jp-carousel-comments-loading"> 1375 <span>Loading Comments...</span> 1376 </div> 1377 <div class="jp-carousel-comments"></div> 1378 <div id="jp-carousel-comment-form-container"> 1379 <span id="jp-carousel-comment-form-spinner"><svg class="jetpack-spinner" width="20" height="20" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><circle cx="50" cy="50" r="46" fill="none" stroke="#ddd" stroke-width="8"/><path d="M 50 4 A 46 46 0 0 1 96 50" fill="none" stroke="currentColor" stroke-width="8" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1.4s" from="0 50 50" to="360 50 50" repeatCount="indefinite"/></path></svg></span> 1380 <div id="jp-carousel-comment-post-results"></div> 1381 <form id="jp-carousel-comment-form"> 1382 <label for="jp-carousel-comment-form-comment-field" class="screen-reader-text">Write a Comment...</label> 1383 <textarea 1384 name="comment" 1385 class="jp-carousel-comment-form-field jp-carousel-comment-form-textarea" 1386 id="jp-carousel-comment-form-comment-field" 1387 placeholder="Write a Comment..." 1388 ></textarea> 1389 <div id="jp-carousel-comment-form-submit-and-info-wrapper"> 1390 <div id="jp-carousel-comment-form-commenting-as"> 1391 <fieldset> 1392 <label for="jp-carousel-comment-form-email-field">Email (Required)</label> 1393 <input type="text" name="email" class="jp-carousel-comment-form-field jp-carousel-comment-form-text-field" id="jp-carousel-comment-form-email-field" /> 1394 </fieldset> 1395 <fieldset> 1396 <label for="jp-carousel-comment-form-author-field">Name (Required)</label> 1397 <input type="text" name="author" class="jp-carousel-comment-form-field jp-carousel-comment-form-text-field" id="jp-carousel-comment-form-author-field" /> 1398 </fieldset> 1399 <fieldset> 1400 <label for="jp-carousel-comment-form-url-field">Website</label> 1401 <input type="text" name="url" class="jp-carousel-comment-form-field jp-carousel-comment-form-text-field" id="jp-carousel-comment-form-url-field" /> 1402 </fieldset> 1403 </div> 1404 <input 1405 type="submit" 1406 name="submit" 1407 class="jp-carousel-comment-form-button" 1408 id="jp-carousel-comment-form-button-submit" 1409 value="Post Comment" /> 1410 </div> 1411 </form> 1412 </div> 1413 </div> 1414 <div class="jp-carousel-image-meta"> 1415 <div class="jp-carousel-title-and-caption"> 1416 <div class="jp-carousel-photo-info"> 1417 <div class="jp-carousel-caption" itemprop="caption description"></div> 1418 </div> 1419 1420 <div class="jp-carousel-photo-description"></div> 1421 </div> 1422 <a class="jp-carousel-image-download" href="#" aria-label="Download image" target="_blank" style="display: none;"> 1423 <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1424 <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="3" y="3" width="19" height="18"> 1425 <path fill-rule="evenodd" clip-rule="evenodd" d="M5.84615 5V19H19.7775V12H21.7677V19C21.7677 20.1 20.8721 21 19.7775 21H5.84615C4.74159 21 3.85596 20.1 3.85596 19V5C3.85596 3.9 4.74159 3 5.84615 3H12.8118V5H5.84615ZM14.802 5V3H21.7677V10H19.7775V6.41L9.99569 16.24L8.59261 14.83L18.3744 5H14.802Z" fill="white"/> 1426 </mask> 1427 <g mask="url(#mask0)"> 1428 <rect x="0.870605" width="23.8823" height="24" fill="#FFFFFF"/> 1429 </g> 1430 </svg> 1431 <span class="jp-carousel-download-text"></span> 1432 </a> 1433 <div class="jp-carousel-image-map" style="display: none;"></div> 1434 </div> 1435 </div>
1436 </div> 1437 </div> 1438 </div> 1439 1440 </div> 1441 1442
1442<script type="text/javascript"> 1443 window.WPCOM_sharing_counts = {"https://learn-powershell.net/2014/09/21/quick-hits-adding-items-to-an-array-and-a-look-at-performance/":5357}; 1444 </script>
1444 1445
1445<script crossorigin='anonymous' type='text/javascript' src='/_static/??-eJzTLy/QTc7PK0nNK9EvyClNz8wr1i+uzCtJrMjITM/IAeKS1CJMEWP94uSizIISoOIM5/yiVL2sYh19yo1yKiotzgjIL08tCs5IzckBmmqfa2toam5gZGBiaWGaBQBqxEKL'></script>
vendor: 1 bytes, line 1445
1445
1446<script type='text/javascript'> 1447 (function(){ 1448 var corecss = document.createElement('link'); 1449 var themecss = document.createElement('link'); 1450 var corecssurl = "/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b"; 1451 if ( corecss.setAttribute ) { 1452 corecss.setAttribute( "rel", "stylesheet" ); 1453 corecss.setAttribute( "type", "text/css" ); 1454 corecss.setAttribute( "href", corecssurl ); 1455 } else { 1456 corecss.rel = "stylesheet"; 1457 corecss.href = corecssurl; 1458 } 1459 document.head.appendChild( corecss ); 1460 var themecssurl = "/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?m=1363304414i&ver=3.0.9b"; 1461 if ( themecss.setAttribute ) { 1462 themecss.setAttribute( "rel", "stylesheet" ); 1463 themecss.setAttribute( "type", "text/css" ); 1464 themecss.setAttribute( "href", themecssurl ); 1465 } else { 1466 themecss.rel = "stylesheet"; 1467 themecss.href = themecssurl; 1468 } 1469 document.head.appendChild( themecss ); 1470 })(); 1471 SyntaxHighlighter.config.strings.expandSource = '+ expand source'; 1472 SyntaxHighlighter.config.strings.help = '?'; 1473 SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n'; 1474 SyntaxHighlighter.config.strings.noBrush = 'Can\'t find brush for: '; 1475 SyntaxHighlighter.config.strings.brushNotHtmlScript = 'Brush wasn\'t configured for html-script option: '; 1476 SyntaxHighlighter.defaults['pad-line-numbers'] = false; 1477 SyntaxHighlighter.defaults['toolbar'] = false; 1478 SyntaxHighlighter.all(); 1479 1480 // Infinite scroll support 1481 document.addEventListener( 'is.post-load', function () { 1482 SyntaxHighlighter.highlight(); 1483 } ); 1484</script>
1484 1485 1486
1486<script type="text/javascript"> 1487 (function () { 1488 var wpcom_reblog = { 1489 source: 'toolbar', 1490 1491 toggle_reblog_box_flair: function (obj_id, post_id) { 1492 1493 // Go to site selector. This will redirect to their blog if they only have one. 1494 const postEndpoint = `https://wordpress.com/post`; 1495 1496 // Ideally we would use the permalink here, but fortunately this will be replaced with the 1497 // post permalink in the editor. 1498 const originalURL = `${ document.location.href }?page_id=${ post_id }`; 1499 1500 const url = 1501 postEndpoint + 1502 '?url=' + 1503 encodeURIComponent( originalURL ) + 1504 '&is_post_share=true' + 1505 '&v=5'; 1506 1507 const redirect = function () { 1508 if ( 1509 ! window.open( url, '_blank' ) 1510 ) { 1511 location.href = url; 1512 } 1513 }; 1514 1515 if ( /Firefox/.test( navigator.userAgent ) ) { 1516 setTimeout( redirect, 0 ); 1517 } else { 1518 redirect(); 1519 } 1520 }, 1521 }; 1522 1523 window.wpcom_reblog = wpcom_reblog; 1524 })(); 1525 </script>
vendor: 1 bytes, line 1525
1525
1526<script crossorigin='anonymous' type='text/javascript' src='/_static/??/wp-content/mu-plugins/likes/queuehandler.js,/wp-includes/js/comment-reply.min.js?m=1785939596j'></script>
vendor: 1 bytes, line 1526
1526
1527<script id="wp-hooks-js" src="/wp-content/plugins/gutenberg-core/v24.1.0/build/scripts/hooks/index.min.js?m=1790763666i&ver=f0f188028580e8dc1255"></script>
vendor: 1 bytes, line 1527
1527
1528<script id="wp-i18n-js" src="/wp-content/plugins/gutenberg-core/v24.1.0/build/scripts/i18n/index.min.js?m=1790763666i&ver=1dfe7db3940c23ea9216"></script>
vendor: 1 bytes, line 1528
1528
1529<script id="wp-i18n-js-after"> 1530wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); 1531//# sourceURL=wp-i18n-js-after 1532</script>
vendor: 1 bytes, line 1532
1532
1533<script id="verbum-settings-js-before"> 1534window.VerbumComments = {"Log in or provide your name and email to leave a reply.":"Log in or provide your name and email to leave a reply.","Log in or provide your name and email to leave a comment.":"Log in or provide your name and email to leave a comment.","Receive web and mobile notifications for posts on this site.":"Receive web and mobile notifications for posts on this site.","Name":"Name","Email (address never made public)":"Email (address never made public)","Website (optional)":"Website (optional)","Leave a reply. (log in optional)":"Leave a reply. (log in optional)","Leave a comment. (log in optional)":"Leave a comment. (log in optional)","Log in to leave a reply.":"Log in to leave a reply.","Log in to leave a comment.":"Log in to leave a comment.","Logged in via %s":"Logged in via %s","Log out":"Log out","Your browser is blocking the cookies needed to log in and comment here. Allow cookies in your privacy settings, then reload the page.":"Your browser is blocking the cookies needed to log in and comment here. Allow cookies in your privacy settings, then reload the page.","Email":"Email","(Address never made public)":"(Address never made public)","Instantly":"Instantly","Daily":"Daily","Reply":"Reply","Comment":"Comment","WordPress":"WordPress","Weekly":"Weekly","Notify me of new posts":"Notify me of new posts","Email me new posts":"Email me new posts","Email me new comments":"Email me new comments","Cancel":"Cancel","Write a comment...":"Write a comment...","Write a reply...":"Write a reply...","Website":"Website","Optional":"Optional","We'll keep you in the loop!":"We'll keep you in the loop!","Loading your comment...":"Loading your comment...","Discover more from":"Discover more from Learn Powershell | Achieve More","Subscribe now to keep reading and get access to the full archive.":"Subscribe now to keep reading and get access to the full archive.","Continue reading":"Continue reading","Never miss a beat!":"Never miss a beat!","Interested in getting blog post updates? Simply click the button below to stay in the loop!":"Interested in getting blog post updates? Simply click the button below to stay in the loop!","Enter your email address":"Enter your email address","Subscribe":"Subscribe","Comment sent successfully":"Comment sent successfully","Save my name, email, and website in this browser for the next time I comment.":"Save my name, email, and website in this browser for the next time I comment.","hovercardi18n":{"Edit your profile \u2192":"Edit your profile \u2192","View profile \u2192":"View profile \u2192","Contact":"Contact","Send money":"Send money","Gravatar not found.":"Gravatar not found.","This profile is private.":"This profile is private.","Too Many Requests.":"Too Many Requests.","Internal Server Error.":"Internal Server Error.","Sorry, we are unable to load this Gravatar profile.":"Sorry, we are unable to load this Gravatar profile."},"siteId":15063622,"postId":5357,"mustLogIn":false,"requireNameEmail":true,"commentRegistration":false,"connectURL":"https://boeprox.wordpress.com/public.api/connect/?action=request\u0026domain=learn-powershell.net","logoutURL":"https://boeprox.wordpress.com/wp-login.php?action=logout\u0026_wpnonce=3100c95c82","homeURL":"https://learn-powershell.net/","subscribeToBlog":true,"subscribeToComment":true,"isJetpackCommentsLoggedIn":false,"jetpackUsername":"","jetpackUserId":0,"jetpackSignature":"","jetpackAvatar":"https://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=96","enableBlocks":true,"enableSubscriptionModal":true,"currentLocale":"en","isJetpackComments":false,"allowedBlocks":["core/paragraph","core/list","core/code","core/list-item","core/quote","core/image","core/embed","core/quote","core/code"],"embedNonce":"2152904eba","verbumBundleUrl":"/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/jetpack_vendor/automattic/jetpack-mu-wpcom/src/features/verbum-comments/dist/index.js","isRTL":false,"vbeCacheBuster":1789740582,"iframeUniqueId":0,"colorScheme":false} 1535//# sourceURL=verbum-settings-js-before 1536</script>
vendor: 1 bytes, line 1536
1536
1537<script data-wp-strategy="defer" defer id="verbum-dynamic-loader-js" src="/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/jetpack_vendor/automattic/jetpack-mu-wpcom/src/build/verbum-comments/assets/dynamic-loader.js?m=1772522099i&minify=false&ver=8b5296f9195db92c42e4"></script>
vendor: 1 bytes, line 1537
1537
1538<script id="jetpack-carousel-js-extra"> 1539var jetpackSwiperLibraryPath = {"url":"/wp-content/mu-plugins/jetpack-plugin/sun/_inc/blocks/swiper.js"}; 1540var jetpackCarouselStrings = {"widths":[370,700,1000,1200,1400,2000],"is_logged_in":"","lang":"en","ajaxurl":"https://learn-powershell.net/wp-admin/admin-ajax.php","nonce":"61876b99d7","display_exif":"1","display_comments":"1","single_image_gallery":"1","single_image_gallery_media_file":"","background_color":"black","comment":"Comment","post_comment":"Post Comment","write_comment":"Write a Comment...","loading_comments":"Loading Comments...","image_label":"Open image in full-screen.","download_original":"View full size \u003Cspan class=\"photo-size\"\u003E{0}\u003Cspan class=\"photo-size-times\"\u003E\u00d7\u003C/span\u003E{1}\u003C/span\u003E","no_comment_text":"Please be sure to submit some text with your comment.","no_comment_email":"Please provide an email address to comment.","no_comment_author":"Please provide your name to comment.","comment_post_error":"Sorry, but there was an error posting your comment. Please try again later.","comment_approved":"Your comment was approved.","comment_unapproved":"Your comment is in moderation.","camera":"Camera","aperture":"Aperture","shutter_speed":"Shutter Speed","focal_length":"Focal Length","copyright":"Copyright","comment_registration":"0","require_name_email":"1","login_url":"https://boeprox.wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Flearn-powershell.net%2F2014%2F09%2F21%2Fquick-hits-adding-items-to-an-array-and-a-look-at-performance%2F","blog_id":"15063622","meta_data":["camera","aperture","shutter_speed","focal_length","copyright"],"stats_query_args":"blog=15063622&v=wpcom&tz=-6&user_id=0&subd=boeprox","is_public":"1"}; 1541//# sourceURL=jetpack-carousel-js-extra 1542</script>
vendor: 1 bytes, line 1542
1542
1543<script id="sharing-js-js-extra"> 1544var sharing_js_options = {"lang":"en","counts":"1","is_stats_active":"1"}; 1545//# sourceURL=sharing-js-js-extra 1546</script>
vendor: 1 bytes, line 1546
1546
1547<script id="jetpack-script-data-js-before"> 1548window.JetpackScriptData = {"site":{"host":"wpcom","is_wpcom_platform":true}}; 1549//# sourceURL=jetpack-script-data-js-before 1550</script>
vendor: 1 bytes, line 1550
1550
1551<script crossorigin='anonymous' type='text/javascript' src='/_static/??-eJydUM0KwjAMfiG7bgjqDuKjSGzrzLampUkdvr2yP8TDDt6S75dED1GZQOJItM8q9rlBYt06iWA69YGGaIKfCc2ZFu76dGRD0pAleBBBs7qA2QnrW8beriCbhFGUBYGi5Z3eLv7quyKZOctACpldv8oWoPBIG6nQIXsnal+UU9wC3NMothvepWJ6xM/69yX8gOQsWPsaR6RmPuHiz9WxLk9VWR3q9g1m15uw'></script>
vendor: 1 bytes, line 1551
1551
1552<script id="sharing-js-js-after"> 1553window.WPCOM_sharing_popups = window.WPCOM_sharing_popups || {}; 1554window.WPCOM_sharing_popups[ "twitter" ] = "menubar=1,resizable=1,width=600,height=350"; 1555window.WPCOM_sharing_popups = window.WPCOM_sharing_popups || {}; 1556window.WPCOM_sharing_popups[ "facebook" ] = "menubar=1,resizable=1,width=600,height=400"; 1557window.WPCOM_sharing_popups = window.WPCOM_sharing_popups || {}; 1558window.WPCOM_sharing_popups[ "linkedin" ] = "menubar=1,resizable=1,width=580,height=450"; 1559//# sourceURL=sharing-js-js-after 1560</script>
vendor: 1 bytes, line 1560
1560
1561<script id="wp-emoji-settings" type="application/json"> 1562{"baseUrl":"https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/","ext":".png","svgUrl":"https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/","svgExt":".svg","source":{"concatemoji":"/wp-includes/js/wp-emoji-release.min.js?m=1783090810i&ver=7.2-alpha-63525"}} 1563</script>
vendor: 1 bytes, line 1563
1563
1564<script type="module"> 1565/*! This file is auto-generated */ 1566var e="script#wp-emoji-settings",t=document.querySelector(e);if(!(t instanceof HTMLScriptElement))throw new Error("Element missing: "+e);const r=JSON.parse(t.text),s=(window._wpemojiSettings=r,"wpEmojiSettingsSupports"),o=["flag","emoji"];function i(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(s,JSON.stringify(t))}catch(e){}}function c(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0);const r=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);return t.every((e,t)=>e===r[t])}function p(e,t){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var n=e.getImageData(16,16,1,1);for(let e=0;e<n.data.length;e++)if(0!==n.data[e])return!1;return!0}function u(e,t,n,r){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\udde8\ud83c\uddf6","\ud83c\udde8\u200b\ud83c\uddf6")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!r(e,"\ud83e\u1fac8")}return!1}function f(e,t,n,r){let a;const s=(a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):document.createElement("canvas")).getContext("2d",{willReadFrequently:!0}),o=(s.textBaseline="top",s.font="600 32px Arial",{});return e.forEach(e=>{o[e]=t(s,e,n,r)}),o}function a(e){var t=document.createElement("script");t.src=e,t.defer=!0,document.head.appendChild(t)}r.supports={everything:!0,everythingExceptFlag:!0},new Promise(t=>{let n=function(){try{var e=JSON.parse(sessionStorage.getItem(s));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(o),u.toString(),c.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"});const a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=e=>{i(n=e.data),a.terminate(),t(n)})}catch(e){}i(n=f(o,u,c,p))}t(n)}).then(e=>{for(const n in e)r.supports[n]=e[n],r.supports.everything=r.supports.everything&&r.supports[n],"flag"!==n&&(r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&r.supports[n]);var t;r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&!r.supports.flag,r.supports.everything||((t=r.source||{}).concatemoji?a(t.concatemoji):t.wpemoji&&t.twemoji&&(a(t.twemoji),a(t.wpemoji)))}); 1567//# sourceURL=/wp-includes/js/wp-emoji-loader.min.js 1568</script>
1568 1569 <iframe src='https://widgets.wp.com/likes/master.html?ver=20261002#ver=20261002' scrolling='no' id='likes-master' name='likes-master' style='display:none;'></iframe> 1570 <div id='likes-other-gravatars' role="dialog" aria-hidden="true" tabindex="-1"><div class="likes-text"><span>%d</span></div><ul class="wpl-avatars sd-like-gravatars"></ul></div> 1571
1571<script src="//stats.wp.com/w.js?69" defer></script>
1571
1571<script type="text/javascript"> 1572_tkq = window._tkq || []; 1573_stq = window._stq || []; 1574_tkq.push(['storeContext', {'blog_id':'15063622','blog_tz':'-6','user_lang':'en','blog_lang':'en','user_id':'0'}]); 1575 // Prevent sending pageview tracking from WP-Admin pages. 1576 _stq.push(['view', {'blog':'15063622','v':'wpcom','tz':'-6','user_id':'0','post':'5357','subd':'boeprox'}]); 1577 _stq.push(['extra', {'crypt':'UE5tW3cvZGQ/JUs1UEpSZlVhejB0d25DRnx2OFhsPXhjZXlCL3FyPUJXeUguSlt1TT9fMENFVlY5XSxCZzFvUUdKZHRVM0oxYks3RD9GOWN5SC1nUWYla1ZLd3NtQkpocHJOK28maXI2bDAralJwd1pxSHVSX24sM3RqWzddejImai1raDRLXzJid3hhU0syQ05JeEhzVixBVmhfQWZbM2YyR2MwZXx4dnhDUHBdOFFCMUpyZ3Qwfmp8PTBYWDlOUFBlPVRiMV02eG0lV05Yd2hGZ0pLMjl8c0ZZbjh6cm9zWGMxQU5GK3daJj1uLng/N21rRnl6VzU3MENhLXJ6azQ='}]); 1578_stq.push([ 'clickTrackerInit', '15063622', '5357' ]); 1579</script>
1579 1580<noscript><img src="https://pixel.wp.com/b.gif?v=noscript" style="height:1px;width:1px;overflow:hidden;position:absolute;bottom:1px;" alt="" /></noscript> 1581<meta id="bilmur" property="bilmur:data" content="" data-provider="wordpress.com" data-service="simple" data-site-tz="America/Chicago" data-custom-props="{"logged_in":"0","wptheme":"pub\/twentyten","wptheme_is_block":"0"}" > 1582
1582<script defer src="/wp-content/js/bilmur.min.js?i=19&m=202640"></script>
1582
1583<script> 1584(function() { 1585 'use strict'; 1586 1587 const fetches = {}; 1588 const promises = {}; 1589 const urls = { 1590 'wp-polyfill': '/wp-includes/js/dist/vendor/wp-polyfill.min.js?m=1786440387i&ver=3.15.0', 1591 'verbum': '/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun/jetpack_vendor/automattic/jetpack-mu-wpcom/src/build/verbum-comments/verbum-comments.js?m=1790810169i&minify=false&ver=03e9edda7ccdfe9a67c4' 1592 }; 1593 const loaders = { 1594 'verbum': () => { 1595 fetchExternalScript('wp-polyfill'); 1596 fetchExternalScript('verbum'); 1597 promises['wp-polyfill'] = promises['wp-polyfill'] || loadWPScript('wp-polyfill'); 1598 promises['verbum'] = promises['verbum'] || promises['wp-polyfill'].then( () => loadWPScript('verbum') ); 1599 return promises['verbum']; 1600 }, 1601 1602 }; 1603 const scriptExtras = { 1604 1605 }; 1606 1607 window.WP_Enqueue_Dynamic_Script = { 1608 loadScript: (handle) => { 1609 if (!loaders[handle]) { 1610 console.error('WP_Enqueue_Dynamic_Script: unregistered script `' + handle + '`.'); 1611 } 1612 return loaders[handle](); 1613 } 1614 }; 1615 1616 function fetchExternalScript(handle) { 1617 if (!urls[handle]) { 1618 return Promise.resolve(); 1619 } 1620 1621 fetches[handle] = fetches[handle] || fetch(urls[handle], { mode: 'no-cors' }); 1622 return fetches[handle]; 1623 } 1624 1625 function runExtraScript(handle, type, index) { 1626 const id = 'wp-enqueue-dynamic-script:' + handle + ':' + type + ':' + (index + 1); 1627 const template = document.getElementById(id); 1628 if (!template) { 1629 return Promise.reject(); 1630 } 1631 1632 const script = document.createElement( 'script' ); 1633 script.innerHTML = template.innerHTML; 1634 document.body.appendChild( script ); 1635 return Promise.resolve(); 1636 } 1637 1638 function loadExternalScript(handle) { 1639 if (!urls[handle]) { 1640 return Promise.resolve(); 1641 } 1642 1643 return fetches[handle].then(() => { 1644 return new Promise((resolve, reject) => { 1645 const script = document.createElement('script'); 1646 script.onload = () => resolve(); 1647 script.onerror = (e) => reject(e); 1648 script.src = urls[handle]; 1649 document.body.appendChild(script); 1650 }); 1651 }); 1652 } 1653 1654 function loadExtra(handle, pos) { 1655 const count = (scriptExtras[handle] && scriptExtras[handle][pos]) || 0; 1656 let promise = Promise.resolve(); 1657 1658 for (let i = 0; i < count; i++) { 1659 promise = promise.then(() => runExtraScript(handle, pos, i)); 1660 } 1661 1662 return promise; 1663 } 1664 1665 function loadWPScript(handle) { 1666 // Core loads scripts in this order. See: https://github.com/WordPress/WordPress/blob/a59eb9d39c4fcba834b70c9e8dfd64feeec10ba6/wp-includes/class-wp-scripts.php#L428. 1667 return loadExtra(handle, 'translations') 1668 .then(() => loadExtra(handle, 'before')) 1669 .then(() => loadExternalScript(handle)) 1670 .then(() => loadExtra(handle, 'after')); 1671 } 1672} )(); 1673</script>
1673 1674</body> 1675</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.