-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of built-in PowerShell commands should be renamed or removed #22
Comments
hmmmmm. It seems that on Windows 10 Write-Log is also included (unless I've inadvertently installed PSDesiredStateConfiguration without realizing it). I know for creating a temp file I was cognizant of the fact that some versions of PowerShell include it, and others didn't. I'll have a think about how to handle this, it may be that we don't need this command on newer PowerShell. |
Dbatools we support 3.0 and higher and have certificate commands. Chrissy wrote those and I'm not sure if she is using built in commands for them or not. |
It looks like all of the dbatools functions have a prefix of dba (well most of them do, and the few that don't wouldn't overlap from what I can tell). This might be what to do for our Import-Certificate. A nice pester test might be to wrap this command up so that they all return False: get-command -Module PSSoftware | % { write-host "$_ : $((command $_.name -all | ? Source -like 'Microsoft.PowerShell.*' | measure | select -expandproperty count) -gt 0)" } Although that being said, I'm not entirely sure why I don't have Import-Certificate on my Windows 10 1803 system... |
I'm on 1803 and it exist on my machine. |
The module contains
Import-Certificate
which is a built-in command for Windows PowerShell in Windows 8 and above. So trying to install this module fails with the below error due to this.It would better to either remove the command from the module or rename it where it will not overwrite the local command.
The text was updated successfully, but these errors were encountered: