paulwetter / DocumentConfigMgrCB

This script attempts to document your entire Configuration Manager (MEMCM/SCCM) environment
https://wetterssource.com/documentconfigmgrcb
174 stars 45 forks source link

Question: Picture File share path #90

Closed J-Hoff389 closed 3 years ago

J-Hoff389 commented 3 years ago

Should the Match pattern allow Admin shares? Should I just not use a UNC path with a folder ending in $?

Your code Snipit: If (($Path -match '^[A-z]:\\.*(\.png|\.jpg)$') -or ($Path -match '^\\\\*\\.*(\.png|\.jpg)$')){ If (Test-Path -Path "filesystem::$Path"){ $EncodedImage = [convert]::ToBase64String((get-content $Path -encoding byte)) }else{ Write-Error "Path not found: $path" Return $false } }

paulwetter commented 3 years ago

Are you referring to the CompanyLogo image? Does a unc or admin share path not work? I thought they should. But I think I always use http or local path.

J-Hoff389 commented 3 years ago

Yes I was referring to the companyLogo image. I got it working. Was using jpg when my file was png.