Skip to content
Merged
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function Initialize-BuildEnvironment {
DeploymentArtifactsPath = [System.IO.Path]::Combine($repositoryRoot, 'DeploymentArtifacts')
LibPath = [System.IO.Path]::Combine($repositoryRoot, 'lib')
PesterOutputFormat = 'CoverageGutters'
CodeCoverageThreshold = 80
CodeCoverageThreshold = 79
}

return $config
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-Base64.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Aliases:

Required: False
Position: Named
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-Base64ToByteArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ConvertFrom-Base64ToByteArray [-String] <String[]> [-ProgressAction <ActionPrefe
```

## DESCRIPTION
Converts a Base 64 Encoded String to a Byte Array
Converts a Base 64 Encoded String to a Byte Array.

## EXAMPLES

Expand Down
20 changes: 17 additions & 3 deletions docs/functions/ConvertFrom-Base64ToString.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ ConvertFrom-Base64ToString [-String] <String[]> [[-Encoding] <String>] [-Decompr
## DESCRIPTION
Converts a base64 encoded string to a string.

When the -Encoding parameter is not specified, the function uses lenient mode:
it first attempts to decode the bytes as UTF-8, and if that fails (due to invalid
byte sequences), it falls back to Latin-1 (ISO-8859-1) encoding which can represent
any byte value.
This is useful when the source encoding is unknown or when decoding
binary data that was Base64 encoded.

When -Encoding is explicitly specified, the function uses strict mode and will
return an error if the decoded bytes are not valid for the specified encoding.

## EXAMPLES

### EXAMPLE 1
Expand Down Expand Up @@ -55,7 +65,7 @@ Another string
## PARAMETERS

### -String
A Base64 Encoded String
A Base64 Encoded String.

```yaml
Type: String[]
Expand All @@ -71,17 +81,21 @@ Accept wildcard characters: False

### -Encoding
The encoding to use for conversion.
Defaults to UTF8.
Valid options are ASCII, BigEndianUnicode, Default, Unicode, UTF32, and UTF8.

When not specified, the function attempts UTF-8 decoding with automatic fallback
to Latin-1 for invalid byte sequences.
When specified, strict decoding is used
and an error is returned if the bytes are invalid for the chosen encoding.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
17 changes: 15 additions & 2 deletions docs/functions/ConvertFrom-ByteArrayToString.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ ConvertFrom-ByteArrayToString [-ByteArray] <Byte[]> [[-Encoding] <String>] [-Pro
Converts a byte array to a string using the specified encoding.
This is the inverse operation of ConvertFrom-StringToByteArray.

When the -Encoding parameter is not specified, the function uses lenient mode:
it first attempts to decode the bytes as UTF-8, and if that fails (due to invalid
byte sequences), it falls back to Latin-1 (ISO-8859-1) encoding which can represent
any byte value.
This is useful when the source encoding is unknown.

When -Encoding is explicitly specified, the function uses strict mode and will
return an error if the bytes are not valid for the specified encoding.

## EXAMPLES

### EXAMPLE 1
Expand Down Expand Up @@ -65,17 +74,21 @@ Accept wildcard characters: False

### -Encoding
The encoding to use for conversion.
Defaults to UTF8.
Valid options are ASCII, BigEndianUnicode, Default, Unicode, UTF32, and UTF8.

When not specified, the function attempts UTF-8 decoding with automatic fallback
to Latin-1 for invalid byte sequences.
When specified, strict decoding is used
and an error is returned if the bytes are invalid for the chosen encoding.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
40 changes: 24 additions & 16 deletions docs/functions/ConvertFrom-CompressedByteArrayToString.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# ConvertFrom-CompressedByteArrayToString

## SYNOPSIS
Converts a string to a byte array object.
Decompresses a Gzip-compressed byte array and converts it to a string.

## SYNTAX

Expand All @@ -18,30 +18,34 @@ ConvertFrom-CompressedByteArrayToString [-ByteArray] <Byte[]> [[-Encoding] <Stri
```

## DESCRIPTION
Converts a string to a byte array object.
Decompresses a Gzip-compressed byte array and converts the result to a string
using the specified encoding.
This is the inverse operation of
ConvertFrom-StringToCompressedByteArray.

When the -Encoding parameter is not specified, the function uses lenient mode:
it first attempts to decode the decompressed bytes as UTF-8, and if that fails
(due to invalid byte sequences), it falls back to Latin-1 (ISO-8859-1) encoding
which can represent any byte value.
This is useful when the source encoding is unknown.

When -Encoding is explicitly specified, the function uses strict mode and will
return an error if the decompressed bytes are not valid for the specified encoding.

## EXAMPLES

### EXAMPLE 1
```
$bytes = ConvertFrom-CompressedByteArrayToString -ByteArray $byteArray
$bytes.GetType()
$compressedBytes = ConvertFrom-StringToCompressedByteArray -String 'Hello, World!'
ConvertFrom-CompressedByteArrayToString -ByteArray $compressedBytes
```

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object\[\] System.Array

$bytes\[0\].GetType()

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Byte System.ValueType
Hello, World!

## PARAMETERS

### -ByteArray
The array of bytes to convert.
The Gzip-compressed byte array to decompress and convert to a string.

```yaml
Type: Byte[]
Expand All @@ -57,17 +61,21 @@ Accept wildcard characters: False

### -Encoding
The encoding to use for conversion.
Defaults to UTF8.
Valid options are ASCII, BigEndianUnicode, Default, Unicode, UTF32, and UTF8.

When not specified, the function attempts UTF-8 decoding with automatic fallback
to Latin-1 for invalid byte sequences.
When specified, strict decoding is used
and an error is returned if the bytes are invalid for the chosen encoding.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-MemoryStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Aliases:

Required: False
Position: Named
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-MemoryStreamToSecureString.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Aliases:

Required: False
Position: Named
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-MemoryStreamToString.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Aliases:

Required: False
Position: Named
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-StringToBase64.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-StringToByteArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-StringToCompressedByteArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertFrom-StringToMemoryStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Aliases:

Required: False
Position: 2
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/ConvertTo-Base64.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Aliases:

Required: False
Position: Named
Default value: UTF8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
32 changes: 29 additions & 3 deletions docs/functions/ConvertTo-Celsius.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ Converts a temperature from Fahrenheit to Celsius.
## SYNTAX

```
ConvertTo-Celsius [-Fahrenheit] <Double> [-ProgressAction <ActionPreference>] [<CommonParameters>]
ConvertTo-Celsius [-Fahrenheit] <Double> [[-Precision] <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
The ConvertTo-Celsius function converts a temperature value from Fahrenheit to Celsius.
It accepts input via parameter or pipeline, validates that the temperature is not below absolute zero
(-459.67°F), and returns the result rounded to two decimal places.
(-459.67°F), and returns the result rounded to the specified precision (default: 2 decimal places).

## EXAMPLES

Expand Down Expand Up @@ -55,6 +56,14 @@ ConvertTo-Celsius -Fahrenheit -40

Converts -40°F to Celsius (-40°C), demonstrating the point where both scales intersect.

### EXAMPLE 5
```
ConvertTo-Celsius -Fahrenheit 0 -Precision 10
-17.7777777778
```

Converts 0°F to Celsius with 10 decimal places of precision.

## PARAMETERS

### -Fahrenheit
Expand All @@ -74,6 +83,23 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Precision
The number of decimal places to round the result to.
Default is 2.
Use higher values for more precise results, or 15 for maximum floating-point precision.

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 2
Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

Expand All @@ -99,7 +125,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS

### System.Double
### Returns the temperature in Celsius as a double value, rounded to two decimal places.
### Returns the temperature in Celsius as a double value, rounded to the specified precision.
## NOTES
The formula used is: °C = (°F - 32) × 5/9

Expand Down
Loading
Loading