A
A
asdz2018-01-07 12:59:01
PowerShell
asdz, 2018-01-07 12:59:01

Why aren't the PowerShell functions from the downloaded ps file being executed?

I'm trying to run any function defined in the file
C:\Program Files\IIS\Microsoft Web Deploy V3\Scripts\BackupScripts.ps1
according to the documentation of
Web Deploy Automatic Backups
powershell swears that the function was not found:

Picture
5a51eb1fbc91a956003825.png

I also tried to step through the script in the debugger, the BackupScripts.ps1 file is executed, the debugger goes through it, but the functions defined in it are still not available, example:
$script = "$($Env:ProgramFiles)\IIS\Microsoft Web Deploy V3\Scripts\BackupScripts.ps1"
& $script
TurnOn-Backups $true

Picture
5a51ee3410efd522232440.png

BackupScripts.ps1 file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
azarij, 2018-01-07
@asdz

and if you load a file with functions like this: a
space between two dots.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question