I can't find command or tool to create script file in the powercli enviroment.
How to create or load the script file?
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
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
Some links around starting with PowerCLI
PowerCLI – Where do I start ?!
My PS libraryhttp://www.vtesseract.com/post/10685628144/resources-for-getting-started-with-powercli-automation
Resources for Getting Started with #PowerCLI Automation
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference