I type the vSphere PowerCLI commands in notepad and save them like : file.ps1
If I want to execute the script, I go to the directory and try to execute it by .file but i always get errors
do I have to put some additional info in de file.ps1?
Do I have to use another extension?
The script is executed in PowerShell v1.0, vSpherePowerCLI 4;x is installed
running a normal command is no problem, but a script won't go! ;-(
please help
What errors are you getting ?
Is your execution policy set corectly ?
Do a
Get-ExecutionPolicy
from the PowerCLI prompt.
If it says "Restricted", do a
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
for example
PS: I moved the thread to the PowerCLI Community
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Welcome to the Community,
try to execute the script like
.\myscript.ps1
André
PS: In your case, it's .\file.ps1
What errors are you getting ?
Is your execution policy set corectly ?
Do a
Get-ExecutionPolicy
from the PowerCLI prompt.
If it says "Restricted", do a
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
for example
PS: I moved the thread to the PowerCLI Community
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thank you it was helpfull