VMware Cloud Community
windvally
Contributor
Contributor
Jump to solution

how to create\edit\save\load script file?

I can't find command or tool to create script file in the powercli enviroment.

How to create or load the script file?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

In it's simplest form you only need the PowerCLI prompt and a text editor, like for example notepad.

Once you have your script saved in a .ps1 file, you can call/execute the script from the PowerCLI prompt.

PS C:\Scripts > ./myscript.ps1

You will have to make sure the PowerShell exsecution policy is set correctly to be able to execute scripts.

The easier way to develop and execute scripts is by using a GUI that allows you to edit and run the script from the same GUI.

With PowerShell comes the ISE, which became quite good in PS v3.

And there are other GUIs like PowerShell Plus from Idera and PowerGui.

Which one to use is a matter of personal preference


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

In it's simplest form you only need the PowerCLI prompt and a text editor, like for example notepad.

Once you have your script saved in a .ps1 file, you can call/execute the script from the PowerCLI prompt.

PS C:\Scripts > ./myscript.ps1

You will have to make sure the PowerShell exsecution policy is set correctly to be able to execute scripts.

The easier way to develop and execute scripts is by using a GUI that allows you to edit and run the script from the same GUI.

With PowerShell comes the ISE, which became quite good in PS v3.

And there are other GUIs like PowerShell Plus from Idera and PowerGui.

Which one to use is a matter of personal preference


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos