Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell equivalent of DOS %~dp0 command

$
0
0

Hello Folks!

Does anyone know of a way to output the directory path of the powershell file being executed is located?  I'm using SCCM to install applications via a script which means the source files (inlcuding the script) will be ran from multiple distribution points and I don't want to point to one particular server's source files.

In Dos or Batch scripts this is done by %~dp0filename.msi.  Is there a way to do this via Powershell?

Thanks in adavance!!


Viewing all articles
Browse latest Browse all 15028

Trending Articles