Cloud Powershell cannot import module for New-SelfSignedCertificate

%3CLINGO-SUB%20id%3D%22lingo-sub-1278833%22%20slang%3D%22en-US%22%3ECloud%20Powershell%20cannot%20import%20module%20for%20New-SelfSignedCertificate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1278833%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20a%20Mac%20user%20and%20I've%20been%20trying%20to%20create%20a%20Self%20Certificate%20as%20described%20in%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory-domain-services%2Ftutorial-configure-ldaps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory-domain-services%2Ftutorial-configure-ldaps%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20run%20the%20commands%20in%20Powershell%20(via%20Azure%20Portal%20web%20Powershell)%20the%20module%20for%20%22New-SelfSignedCertificate%22%20is%20missing%20and%20I%20know%20it%20needs%20to%20be%20imported.%20According%20to%20Documentation%20this%20module%20is%20PKIClient%2C%20but%20I%20could%20not%20find%20a%20way%20to%20import%20it%20and%20I'm%20stuck%20and%20cannot%20run%20the%20%22New-SelfSignedCertificate%22%20command.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20you%20can%20give%3F%20If%20you%20know%20which%20module%20can%20be%20imported%20or%20if%20you%20find%20evidence%20this%20doesn't%20work%20in%20the%20azure%20web%20portal%20it%20would%20be%20greatly%20appreciated.%20Thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%3A%20I'm%20in%20the%20middle%20of%20a%20covid19%20isolation%20crysis%20and%20I%20have%20no%20Windows%20machine%20I%20can%20use.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1278833%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1279270%22%20slang%3D%22en-US%22%3ERe%3A%20Cloud%20Powershell%20cannot%20import%20module%20for%20New-SelfSignedCertificate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1279270%22%20slang%3D%22en-US%22%3E%3CP%3EAfaik%20that%20module%20is%20not%20supported%20on%20Core%2C%20thus%20it%20will%20not%20run%20on%20non-windows%20installs.%20Use%20openssl%20or%20any%20other%20native%20tool.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1284713%22%20slang%3D%22en-US%22%3ERe%3A%20Cloud%20Powershell%20cannot%20import%20module%20for%20New-SelfSignedCertificate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1284713%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%2C%20as%20I%20explained%20above%2C%20I%20don't%20run%20any%20PowerShell%20commands%20in%20Mac%2C%20I%20am%20using%20Cloud%20Shell%20(web%20interface)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1285230%22%20slang%3D%22en-US%22%3ERe%3A%20Cloud%20Powershell%20cannot%20import%20module%20for%20New-SelfSignedCertificate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1285230%22%20slang%3D%22en-US%22%3E%3CP%3ENo%20difference%20there%2C%20that's%20still%20PowerShell%20Core%20and%20the%20cmdlet%20is%20not%20supported.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I'm a Mac user and I've been trying to create a Self Certificate as described in:
https://docs.microsoft.com/en-us/azure/active-directory-domain-services/tutorial-configure-ldaps

 

When I run the commands in Powershell (via Azure Portal web Powershell) the module for "New-SelfSignedCertificate" is missing and I know it needs to be imported. According to Documentation this module is PKIClient, but I could not find a way to import it and I'm stuck and cannot run the "New-SelfSignedCertificate" command.

Any help you can give? If you know which module can be imported or if you find evidence this doesn't work in the azure web portal it would be greatly appreciated. Thanks

 

PS: I'm in the middle of a covid19 isolation crysis and I have no Windows machine I can use.

 

EDIT: 

I've also tried this alternative:
https://techcommunity.microsoft.com/t5/itops-talk-blog/how-to-create-a-self-signed-certificate-in-az... 

but when I try to save Secure LDAP settings with this certificate in my Azure AD Domain Service it gives error and to check Activity Log (in which I cannot find more details about why it fails)

3 Replies
Highlighted

Afaik that module is not supported on Core, thus it will not run on non-windows installs. Use openssl or any other native tool.

Hi @Vasil Michev , as I explained above, I don't run any PowerShell commands in Mac, I am using Cloud Shell (web interface)

Highlighted

No difference there, that's still PowerShell Core and the cmdlet is not supported.