-
Notifications
You must be signed in to change notification settings - Fork 59
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
Get-CertificateRequest does not allow for relative Paths #51
Comments
I'll take a look. I thought, relative paths should work by default. |
Thread was not updated for a long time. |
issue not solved. |
I can't repro this. Here is what I get in my lab:
|
Hello Vadims
I'll check again tomorrow morning. I don't have my computer running.
Thank you
Patrick
…________________________________
|
Hello Vadims I can reproduce the issue (See Windows and PowerShell Version information below).
The issue is in line 20:
Changing it slightly using Resolve-Path (which works using relative and full paths, but may return more then one file using wildcards):
I tried on the following Windows / PowerShell Versions
|
Ok, reopened the issue. It seems that PS no longer updates working directory for .NET classes. As the result if you switch current directory in PS console, then relative paths will stop working. Can you confirm current working directory for .net: |
Hello Vadims You are right. the current .Net location is different than the current location I cd'd to.
When executing the command in C:\Windows\system32 and use a path relative to this, the command works.
What also works is adding $PWD in front of the relative path, but of course only if the path
But probably most reliant is always converting each path to full path using |
Get-CertificateRequest returns file not found when using relative path like .\MyRequest.csr
Get-CertificateRequest -Path .\MyRequest.csr
The following works:
Get-CertificateRequest -Path ( Resolve-Path .\MyRequest.csr )
It would come handy if relative paths are supported.
The text was updated successfully, but these errors were encountered: