From b0246898da471e08ffabc70991b8ec5266f81528 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 20 Jun 2024 16:22:52 -0500 Subject: [PATCH] Remove unnecessary link to reddit (#11204) --- .../learn/deep-dives/everything-about-arrays.md | 8 +++----- .../learn/deep-dives/everything-about-exceptions.md | 9 ++++----- .../learn/deep-dives/everything-about-pscustomobject.md | 8 +++----- .../deep-dives/everything-about-string-substitutions.md | 8 +++----- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/reference/docs-conceptual/learn/deep-dives/everything-about-arrays.md b/reference/docs-conceptual/learn/deep-dives/everything-about-arrays.md index 2b7ede36a69..c1036cb8a72 100644 --- a/reference/docs-conceptual/learn/deep-dives/everything-about-arrays.md +++ b/reference/docs-conceptual/learn/deep-dives/everything-about-arrays.md @@ -1,7 +1,7 @@ --- description: Arrays are a fundamental language feature of most programming languages. ms.custom: contributor-KevinMarquette -ms.date: 11/16/2022 +ms.date: 06/20/2024 title: Everything you wanted to know about arrays --- # Everything you wanted to know about arrays @@ -842,8 +842,8 @@ if ( $null -ne $array -and @($array).count -gt 0 ) ### All -eq -I recently saw someone ask [how to verify that every value in an array matches a given value][14]. -Reddit user **/u/bis** had this clever [solution][15] that checks for any incorrect values and then +I recently saw someone on Reddit ask how to verify that every value in an array matches a given +value. Reddit user `u/bis` had this clever solution that checks for any incorrect values and then flips the result. ```powershell @@ -1237,5 +1237,3 @@ From here, I would recommend you check out a similar post that I wrote about [ha [11]: https://powershellexplained.com/2017-11-20-Powershell-StringBuilder/ [12]: https://powershellexplained.com/2018-10-15-Powershell-arrays-Everything-you-wanted-to-know/ [13]: https://twitter.com/KevinMarquette -[14]: https://www.reddit.com/r/PowerShell/comments/9mzo09/if_statement_multiple_variables_but_1_condition -[15]: https://www.reddit.com/r/PowerShell/comments/9mzo09/if_statement_multiple_variables_but_1_condition/e7iizca diff --git a/reference/docs-conceptual/learn/deep-dives/everything-about-exceptions.md b/reference/docs-conceptual/learn/deep-dives/everything-about-exceptions.md index fd194160e75..8b1365797b3 100644 --- a/reference/docs-conceptual/learn/deep-dives/everything-about-exceptions.md +++ b/reference/docs-conceptual/learn/deep-dives/everything-about-exceptions.md @@ -1,7 +1,7 @@ --- description: Error handling is just part of life when it comes to writing code. ms.custom: contributor-KevinMarquette -ms.date: 08/15/2023 +ms.date: 06/20/2024 title: Everything you wanted to know about exceptions --- # Everything you wanted to know about exceptions @@ -358,7 +358,7 @@ catch [System.IO.IOException] } ``` -Thank you `/u/Sheppard_Ra` for suggesting this addition. +Thank you Redditor `u/Sheppard_Ra` for suggesting this addition. ### Throwing typed exceptions @@ -423,8 +423,8 @@ catch [System.IO.FileNotFoundException] #### The big list of .NET exceptions -I compiled a master list with the help of the [Reddit/r/PowerShell community][09] that contains -hundreds of .NET exceptions to complement this post. +I compiled a master list with the help of the Reddit `r/PowerShell` community that contains hundreds +of .NET exceptions to complement this post. - [The big list of .NET exceptions][06] @@ -672,4 +672,3 @@ advice and make `ThrowTerminatingError` my goto exception handler for every func [06]: https://powershellexplained.com/2017-04-07-all-dotnet-exception-list [07]: https://powershellexplained.com/2017-04-10-Powershell-exceptions-everything-you-ever-wanted-to-know/ [08]: https://twitter.com/KevinMarquette -[09]: https://www.reddit.com/r/PowerShell/comments/64866o/kevmar_all_net_46_exceptions_list_for_use_with/ diff --git a/reference/docs-conceptual/learn/deep-dives/everything-about-pscustomobject.md b/reference/docs-conceptual/learn/deep-dives/everything-about-pscustomobject.md index fe31341e3b2..d577181faaf 100644 --- a/reference/docs-conceptual/learn/deep-dives/everything-about-pscustomobject.md +++ b/reference/docs-conceptual/learn/deep-dives/everything-about-pscustomobject.md @@ -1,7 +1,7 @@ --- description: PSCustomObject is a simple way to create structured data. ms.custom: contributor-KevinMarquette -ms.date: 05/06/2024 +ms.date: 06/20/2024 title: Everything you wanted to know about PSCustomObject --- # Everything you wanted to know about PSCustomObject @@ -270,9 +270,8 @@ people do it: $myObject.PSObject.TypeNames.Insert(0,"My.Object") ``` -I recently discovered another way to do this from this -[post by /u/markekraus][14]. He talks about this approach that allows you to -define it inline. +I recently discovered another way to do this from Redditor `u/markekraus`. He talks about this +approach that allows you to define it inline. ```powershell $myObject = [PSCustomObject]@{ @@ -410,4 +409,3 @@ something and can find a way to work this into your scripts. [10]: https://powershellexplained.com/2016-10-28-powershell-everything-you-wanted-to-know-about-pscustomobject/ [11]: https://powershellexplained.com/2017-03-18-Powershell-reading-and-saving-data-to-files [13]: https://twitter.com/KevinMarquette -[14]: https://www.reddit.com/r/PowerShell/comments/590awc/is_it_possible_to_initialize_a_pscustoobject_with/ diff --git a/reference/docs-conceptual/learn/deep-dives/everything-about-string-substitutions.md b/reference/docs-conceptual/learn/deep-dives/everything-about-string-substitutions.md index b9dc216a8a8..863c1ea7558 100644 --- a/reference/docs-conceptual/learn/deep-dives/everything-about-string-substitutions.md +++ b/reference/docs-conceptual/learn/deep-dives/everything-about-string-substitutions.md @@ -1,7 +1,7 @@ --- description: There are many ways to use variables in strings to create formatted text. ms.custom: contributor-KevinMarquette -ms.date: 11/16/2022 +ms.date: 06/20/2024 title: Everything you wanted to know about variable substitution in strings --- # Everything you wanted to know about variable substitution in strings @@ -234,7 +234,7 @@ $tester = "Better" Write-Host "$test $tester ${test}ter" ``` -Thank you [/u/real_parbold][18] for that one. +Thank you Redditor `u/real_parbold` for that one. Here is an alternate to this approach: @@ -312,7 +312,7 @@ foreach($name in $nameList){ ``` To keep going on this idea; you could be importing a large email template from a text file to do -this. I have to thank [Mark Kraus][02] for this [suggestion][17]. +this. I have to thank [Mark Kraus][02] for this suggestion. ## Whatever works the best for you @@ -357,5 +357,3 @@ see the following list for the reference documentation. [14]: https://powershellexplained.com/2017-01-13-powershell-variable-substitution-in-strings/ [15]: https://powershellexplained.com/2017-03-18-Powershell-reading-and-saving-data-to-files/ [16]: https://twitter.com/KevinMarquette -[17]: https://www.reddit.com/r/PowerShell/comments/5npf8h/kevmar_everything_you_wanted_to_know_about/dcdfia5/ -[18]: https://www.reddit.com/r/PowerShell/comments/5npf8h/kevmar_everything_you_wanted_to_know_about/dcdfm6p/