* add tests
* fix formatting issues
* Make redirection to variable an experimental feature.
Update test to check for experimental feature status.
Set-Variable will still have the -append parameter, but if used when the experimental feature is disabled, a parameter binding error will result.
* Check to be sure provider is not null.
* update to use different FullyQualifiedErrorId
* use Experimental attribute for append parameter rather than runtime check.
* Revert "update to use different FullyQualifiedErrorId"
This reverts commit 8b34af1ac19ecdb821b34534e446ab129830c92f.
* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs
Co-authored-by: Ilya <darpa@yandex.ru>
* Move remediation steps into resource.
Update Set-Variable -Append to be correct when -name and -value are used.
Add tests for the new behavior in Set-Variable.
* Change expected error for contrained language mode and redirection.
* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs
Co-authored-by: Ilya <darpa@yandex.ru>
* Support redirection of native app.
Add tests to validate.
* testexe needs proper case to run on linux.
* Address codefactor issues 01.
* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
Co-authored-by: Steve Lee <slee@microsoft.com>
* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs
Co-authored-by: Steve Lee <slee@microsoft.com>
* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
Co-authored-by: Steve Lee <slee@microsoft.com>
---------
Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Steve Lee <slee@microsoft.com>
Adds the -DateKind parameter to the ConvertFrom-Json that allows the
caller to control how DateTime strings are converted into an object. The
default behaviour is to create a DateTime value with the Kind being
Unspecified if no TZ is set, Utc if the TZ Z is set, Local (after
conversion) if an explicit TZ is set. This adds a Utc, Local to
explicitly set the Kind as desired as well as a Offset and String value
to create a DateTimeOffset or keep as a string.
Updates the Test-Json cmdlet to use JsonSchema.Net instead of NJsonSchema in order to:
- use System.Text.Json instead of Newtonsoft
- support the latest JSON Schema drafts (up to 2020-12)
* Added SkipLast parameter set to Skip parameter and updated tests
* Using Should -BeExactly with string
* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Select-Object.Tests.ps1
---------
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Travis Plunk <github@ez13.net>
* Add `Get-SecureRandom` cmdlet
* update comments
* address Paul and Travis' comments
* Update test/powershell/Modules/Microsoft.PowerShell.Utility/Get-SecureRandom.Tests.ps1
Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
* address codefactor
* address Ilya's feedback creating a base class for both cmdlets
* remove unused `using`
---------
Co-authored-by: James Truher [MSFT] <jimtru@microsoft.com>
* Add CI for win-arm64
* Add common function to test for windows arm64
* Update because string where items need investigation
---------
Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>