Goto Top

Powershell Folder Picker Dialog

Hello Guys face-smile

i'm just thinking about to implement a folder picking dialog box in my existing script.
In my existing script i want to install fonts on a remote machine. This script is working fine, but i need to write the folder path harcoded into the script.
Now i want to change this.

This is my script which is installing the fonts.

In line 13, i'm trying to change it with the following folder picker dialog.

Replacing the hardcoded folder with the
does not work. There is no error message.

Content-Key: 658826


Printed on: December 5, 2022 at 15:12 o'clock

Member: GarfieldBonn
GarfieldBonn Mar 04, 2021 at 12:51:51 (UTC)
Goto Top

should it no be

$FontDir = Get-Folder
Member: natalie.solero
natalie.solero Mar 04, 2021 at 12:59:20 (UTC)
Goto Top
Unfortunately i't doesn't work. The script closes directly without any error message.
Member: GarfieldBonn
GarfieldBonn Mar 04, 2021 at 14:42:49 (UTC)
Goto Top
i tested it up to the foreach loop. It works fine.

How do you bind the function? Same script or via include-path?

The scipt works fine withput the function? Then it must be how how you bind it to the rest.