I am wondering how to get the location of the script I am running or writing. We have a set of .NET assemblies placed in the same directory as the current PowerShell script, and we want load them from the script. Right now I am using a fixed path to locate assemblies, but we want to load them from the current file location.
[System.Reflection.Assembly]::LoadFrom
("C:\Work\Scripts\Assemblies\DynamicOps.ManagementModel.Client.dll")
[System.Reflection.Assembly]::LoadFrom
("C:\Work\Scripts\Assemblies\DynamicOps.Repository.dll")