Commit graph

17 commits

Author SHA1 Message Date
Steve Lee b7cb335f03
Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
xtqqczze 225164037f Correct case of $PID special variable 2020-01-13 19:34:38 +00:00
xtqqczze d0f28128f5 Correct case of $ExecutionContext special variable 2020-01-13 19:33:14 +00:00
xtqqczze 679702ba05 Correct case of $PSDefaultParameterValues special variable 2020-01-13 19:21:25 +00:00
Robert Holt 649d342a07 Replace test certificates with self-signed certificate generating command (#7875) 2018-10-01 14:40:48 -07:00
Klaudia Algiz 2df9aac811 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682)
Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests.
Get rid of try { } catch { } formula to assert that errors were thrown.
Small fixes in tests to obey the new Pester -Parameter syntax.
2018-05-17 14:42:04 -07:00
Kevin Marquette acb52b3d9c Update tests in Microsoft.PowerShell.Security folder to use Pesterv4 syntax (#6256) 2018-03-23 10:41:14 -07:00
Travis Plunk 260aa49c4f
fix secret and JavaScript compliance issues (#6408)
fix secret and JavaScript compliance issues
- mark secrets as a test only secrets
- make javascript use strict in a specific function
2018-03-16 18:05:32 -07:00
Roman Beltyukov 3ebe0a9cb0 Add Password parameter to Get-PfxCertificate cmdlet (#6113)
Add Password parameter to Get-PfxCertificate cmdlet to allow automatization instead of prompting for password every time.
2018-02-23 07:29:02 +04:00
Steve Lee c1c5344a88 Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: #6140

Manually reviewed each change.

Fix #6073
2018-02-13 09:23:53 -08:00
Steve Lee 25a32284dd fix tests not setting back $psdefaultparametervalues back correctly (#4892) 2017-09-23 13:48:51 -07:00
bergmeister ffd39b2853 PSScriptAnalyzer fixes by category (#4261)
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'
2017-07-21 21:03:49 -07:00
Travis Plunk 684e06eb11 Make DocumentEncryptionCert test pending (#3854) 2017-05-24 12:22:17 -07:00
Travis Plunk 3496136999 Remove undocumented certificate Win32 APIs (#3818)
The code paths deleted where using the undocumented Win32 APIs on WIn8 and newer for the following purposes:
* Faster filtering
* Getting two properties (left empty on Win7 and below)
* Logging using Certificate components when a cert is deleted or copied.

After the change, all the code uses public APIs.  Filtering is done in PowerShell using existing code.  I don't believe the logging is needed.
2017-05-22 22:33:51 -07:00
Steve Lee 76de340e79 corrected use of PSModulePath casing to be consistent with Windows PowerShell (#3255)
* corrected use of PSModulePath casing to be consistent with Windows PowerShell
addresses #3227

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in

* addressing review feedback
make "PSModulePath" into const
fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in
2017-03-15 12:04:28 -07:00
Dongbo Wang 60583b1b73 Fix a CMS test that fails in nightly build.
Add a certificate that cannot be used to encrypt data to verify an error condition.
2017-03-07 13:39:15 -08:00
Dongbo Wang fc30ae1d87 Port CmsMessage cmdlets and Get-PfxCertificate to powershell core (#3224) 2017-03-01 10:51:19 -08:00