Skip to content

Commit

Permalink
Remove unnecessary link to reddit (#11204)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler committed Jun 20, 2024
1 parent 35bc755 commit b024689
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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]

Expand Down Expand Up @@ -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/
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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]@{
Expand Down Expand Up @@ -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/
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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/

0 comments on commit b024689

Please sign in to comment.