PowerShell is missing Import-Certificate

1

I was trying to install some certificates via PowerShell's Import-Certificate command, which works great on Windows 10. When I ran it on Windows 7, Import-Certificate wasn't found. I downloaded WMF 5.1 to get the latest PowerShell, and rebooted per the installer's instructions, but Import-Certificate still isn't available. What am I doing wrong?

J Woltman

Posted 2018-08-30T17:33:39.640

Reputation: 43

You're not; some cmdlets are tied to the OS version rather than the WMF version, and won't be available even with the latest WMF installed on an older OS. An example of such a cmdlet is Get-Printer; even with the latest WMF, it's simply not available on Windows 7. Import-Certificate may also be such a cmdlet. – Jeff Zeitlin – 2018-08-30T18:07:05.360

I do believe you're correct. I can see it's available in Server 2012/Windows 8, but I don't see it under Windows 7. Thanks for the answer. – J Woltman – 2018-08-30T19:47:28.987

Also not available on Windows Server 2008 R2. – CJBS – 2020-02-18T19:41:24.293

Answers

2

Some PowerShell cmdlets are tied to the version of Windows, rather than the version of WMF and PowerShell installed on the computer. Import-Certificate seems to be one of them; I've not found any site where I can say conclusively that it accurately shows the dependencies for any given cmdlet; Microsoft's PowerShell documentation site only references the versions of PowerShell where they first occur, without noting whether they'll "carry back" if installed on an earlier version of the OS. In general, for safety, I'd therefore assume that any cmdlet introduced in a later version of PowerShell doesn't carry back to earlier OS versions.

For reference, Windows 7/Server 2008r2 shipped with PowerShell 2; Windows 8/Server 2012 shipped with PowerShell 3, Windows 8.1/Server 2012r2 shipped with PowerShell 4, and Windows 10/Server 2016 shipped with PowerShell 5.

Jeff Zeitlin

Posted 2018-08-30T17:33:39.640

Reputation: 2 918