Get-ScriptDirectory to the Rescue
-
The other day I was writing a script and decided that I wanted to break it into a couple of files and have the main script dot-source a library script in the same directory. Here is the problem that I ran into:
PSGet-ChildItem
Directory: Microsoft.PowerShell.Core\FileSystem::C:\Temp\test
Mode LastWriteTime Length Name
—- ————- ——The post Get-ScriptDirectory to the Rescue appeared first on PowerShell.
https://devblogs.microsoft.com/powershell/get-scriptdirectory-to-the-rescue/
© Lightnetics 2024