Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
PnP.Powershell version : 2.3.0 / 2.4.0
OS : Windows 11
Powershell version : 7.4.1
Reporting Issue :
New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -CertificatePassword (ConvertTo-SecureString -String "pass@word1" -AsPlainText -Force)
Generate an error : Object reference not set to an instance of an object.
Commandlet is operational with Powershell 7.4.0
EDIT 14/03/2024 :
Powershell version IS NOT the problem.
The commandlet work with PnP.Powershell 2.2.0 / Powershell 7.4.1
Get-Error :
Exception :
Type : System.NullReferenceException
TargetSite :
Name : WriteAzureCertificateOutput
DeclaringType : PnP.PowerShell.Commands.Base.GetPnPAdalCertificate
MemberType : Method
Module : PnP.PowerShell.dll
Message : Object reference not set to an instance of an object.
Source : PnP.PowerShell
HResult : -2147467261
StackTrace :
at PnP.PowerShell.Commands.Base.GetPnPAdalCertificate.WriteAzureCertificateOutput(PSCmdlet cmdlet, X509Certificate2 certificate, SecureString password) in
c:\build\src\Commands\Base\GetAzureCertificate.cs:line 82
at PnP.PowerShell.Commands.Base.NewPnPAdalCertificate.ProcessRecord() in c:\build\src\Commands\Base\NewAzureCertificate.cs:line 104
at System.Management.Automation.CommandProcessor.ProcessRecord()
CategoryInfo : NotSpecified: (:) [New-PnPAzureCertificate], NullReferenceException
FullyQualifiedErrorId : System.NullReferenceException,PnP.PowerShell.Commands.Base.NewPnPAdalCertificate
InvocationInfo :
MyCommand : New-PnPAzureCertificate
ScriptLineNumber : 1
OffsetInLine : 2
HistoryId : 4
Line : New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -CertificatePassword (ConvertTo-SecureString -String "pass@word1" -AsPlainText -Force)
Statement : New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -CertificatePassword (ConvertTo-SecureString -String "pass@word1" -AsPlainText -Force)
PositionMessage : At line:1 char:2
+ New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer -Certificat …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : New-PnPAzureCertificate
CommandOrigin : Internal
ScriptStackTrace : at , : line 1
Beta Was this translation helpful? Give feedback.
All reactions