Question about command-script

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
kcl
Posts: 4
Joined: Wed Nov 22, 2017 11:57 am
Contact:

Fri Nov 24, 2017 12:08 pm

Good morning.
I have the question. Can i write and share command-script to manage StarWind using powershell? (I worried about free license)
It can help to use basic feature. (Add,remove target, image, acl)

By the way, when i update ACL, powershell has a crit error, but add and remove work correctly.
Rome wasn’t built in a day.

Command-script for basic actions StarWind: https://sourceforge.net/projects/powerstar/
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Fri Nov 24, 2017 12:51 pm

Feel free to do so.
As StarWind VSAN Free is community supported and StarWindX Powershell scripts are examples of how you can manage the setup, the community will definitely appreciate your input.
kcl
Posts: 4
Joined: Wed Nov 22, 2017 11:57 am
Contact:

Mon Nov 27, 2017 9:17 am

Rome wasn’t built in a day.

Command-script for basic actions StarWind: https://sourceforge.net/projects/powerstar/
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Mon Nov 27, 2017 3:04 pm

Fine, keep the community updated.
kcl
Posts: 4
Joined: Wed Nov 22, 2017 11:57 am
Contact:

Wed Feb 07, 2018 2:56 pm

I Updated the script. Please write here wishes. I'll try to add them.
Many thanks to StarWind for Great product!
Rome wasn’t built in a day.

Command-script for basic actions StarWind: https://sourceforge.net/projects/powerstar/
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Feb 07, 2018 3:36 pm

Great. Keep doing the great work.
webguyz
Posts: 23
Joined: Sat Jan 26, 2013 12:34 am

Tue Jun 26, 2018 2:02 pm

Boris,

In requirements its says -Powershell xD

The only references I found for xD were XenDesk Powershell. Is that what is required?

Ran your script but got errors and was wondering if its because I'm missing something.

Newbie to PowerShell.

Thanks!
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Tue Jun 26, 2018 2:27 pm

That was a smiley - xD. Nothing related to PowerShell. Interpretation is "It requires PowerShell, which is obvious as long as it is based on the StarWindX PowerShell module".
webguyz
Posts: 23
Joined: Sat Jan 26, 2013 12:34 am

Tue Jun 26, 2018 2:43 pm

When I run the lastest script my PowerStar window comes up but in PS I get the error Below

The variable '$global:one' cannot be retrieved because it has not been set.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:589 char:1
+ $global:one
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (global:one:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined


I can connect to one of my 2 HA nodes and when I click the HAImagex it does show me the info and sync status, but when I click on the IQN it shows nothing and generates PS Errors:

True v4.0.30319 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5
0
0


The variable '$global:one' cannot be retrieved because it has not been set.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:589 char:1
+ $global:one
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (global:one:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined

The variable '$M_TextBox01' cannot be retrieved because it has not been set.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:596 char:5
+ $M_TextBox01.Text
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (M_TextBox01:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined

The property 'TargetName' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:519 char:5
+ $M_ListBox1.Items.Add(""+$targettemp.TargetName)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:520 char:5
+ $M_ListBox1.Items.Add("LuneName: "+$targettemp.Name)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'File' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:521 char:5
+ $M_ListBox1.Items.Add("File: "+$targettemp.File)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Size' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:522 char:5
+ $M_ListBox1.Items.Add("Size: "+$targettemp.Size)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'DeviceType' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:523 char:5
+ $M_ListBox1.Items.Add("Type: "+$targettemp.DeviceType)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:524 char:9
+ if ($targettemp.name -like "HA*") {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'TargetName' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:519 char:5
+ $M_ListBox1.Items.Add(""+$targettemp.TargetName)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:520 char:5
+ $M_ListBox1.Items.Add("LuneName: "+$targettemp.Name)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'File' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:521 char:5
+ $M_ListBox1.Items.Add("File: "+$targettemp.File)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Size' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:522 char:5
+ $M_ListBox1.Items.Add("Size: "+$targettemp.Size)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'DeviceType' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:523 char:5
+ $M_ListBox1.Items.Add("Type: "+$targettemp.DeviceType)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:524 char:9
+ if ($targettemp.name -like "HA*") {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'TargetName' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:519 char:5
+ $M_ListBox1.Items.Add(""+$targettemp.TargetName)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:520 char:5
+ $M_ListBox1.Items.Add("LuneName: "+$targettemp.Name)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'File' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:521 char:5
+ $M_ListBox1.Items.Add("File: "+$targettemp.File)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'Size' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:522 char:5
+ $M_ListBox1.Items.Add("Size: "+$targettemp.Size)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'DeviceType' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:523 char:5
+ $M_ListBox1.Items.Add("Type: "+$targettemp.DeviceType)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'name' cannot be found on this object. Verify that the property exists.
At C:\Windows\system32\WindowsPowerShell\v1.0\Starwind_a_06.ps1:524 char:9
+ if ($targettemp.name -like "HA*") {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

Thanks! This is a very nice script and will be a valuable addition.
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Mon Jul 02, 2018 4:51 pm

I believe you would need to contact the author of the script - kcl.
webguyz
Posts: 23
Joined: Sat Jan 26, 2013 12:34 am

Mon Jul 02, 2018 5:13 pm

I copied the script to the c:\windows\system32\WindowsPowerShell\v1.0 folder and it worked without error.

Thanks!
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Mon Jul 02, 2018 5:51 pm

Great to know this simple cheat. Thanks for posting.
Post Reply