Hello,
I did not write this argument and I am a noob when it comes to PowerShell, my predecessor wrote the script and I'm trying to figure out how to resolve the returned result. The issue is that the original server and share path (a Windows Server 2008 R2) has been decommissioned and I have created a new Windows server 2016 with a new share folder.
I'm trying to figure out an If / Else argument that returns an error with unusually fully qualified domain path with doulbe "\".
Variable:
$CertPath = "\servername.domain.com\sharefolder\SSL_Cert.cer"
If/Else:
if (Resolve-Path -Path $CertPath)
{ $CertPath = $(Resolve-Path -Path $CertPath).Path }
else
{ write-statuslog -m "ERROR: Certificate Path cannot be resolve certificate file name: $CertPath" -exit }
Result:
\nERROR: Certificate Path cannot be resolve certificate file name: \\servername.domain.com\sharefolder\SSL_Cert.cer\n
What would be producing the "\" on the FQDN?
Many thanks in advance.