So, I can find out the directory of the script with
function Get-ScriptDirectory { Split-Path -parent $PSCommandPath }
But I can't manage to change the directory to the folder, where the script is saved. For example
cd d:\MyScripts\
So something like
cd function Get-ScriptDirectory { Split-Path -parent $PSCommandPath }
doesn't work.
And sorry if that is a common and dumb question, but I'm new in powershell and I searched and tried a lot before posting here