Powershell Maintenace commands (vs installation)

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

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

Post Reply
lmoss
Posts: 1
Joined: Fri Aug 04, 2017 3:23 pm

Fri Aug 04, 2017 3:25 pm

Hi, I just had to use the management console to mark one of my two nodes as Synchronized, after both nodes went down with a power failure, and the cluster was failed. Everything came back up, but I was wondering how I would do the same thing via the StarwindX Powershell console (?)
Thanks
Sergey (staff)
Staff
Posts: 86
Joined: Mon Jul 17, 2017 4:12 pm

Fri Aug 04, 2017 4:29 pm

Hello, lmoss!
You can find some StarWindX samples here: C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell
There is one, called syncHaDevice.ps1
As you see, first we connect to the server, which contains the list of devices. You have to select the device that you need, and apply MarkAsSynchronize() method to the device. Feel free to update the script to fit your needs.
diego
Posts: 4
Joined: Thu Sep 14, 2017 12:11 pm

Thu Sep 14, 2017 12:22 pm

Hi,

I have the free version and my licence is expired
and my both server was disconnected

the managment consol is present but if try to click to connect one of my server i have this message " "the trial priod has expired you can continue managing starwind with powershell"

How I can connect again the server with powershell? witch cmdlet ?
Sergey (staff)
Staff
Posts: 86
Joined: Mon Jul 17, 2017 4:12 pm

Thu Sep 14, 2017 2:45 pm

Hello, Diego! You can connect to the local server with the following commands:

Code: Select all

Import-Module StarWindX
$server = New-SWServer 127.0.0.1 3261 root starwind
$server.Connect()
bienvenu
Posts: 2
Joined: Fri Mar 02, 2018 9:31 am

Fri Mar 02, 2018 10:28 am

Hello again .
phew! I found this last answer at the right time!
indeed, the license of my free version is at the end and I would have had difficulty in case of a crash, make visible the HAs :D
Sergey (staff) wrote:Hello, lmoss!
You can find some StarWindX samples here: C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell
There is one, called syncHaDevice.ps1
As you see, first we connect to the server, which contains the list of devices. You have to select the device that you need, and apply MarkAsSynchronize() method to the device. Feel free to update the script to fit your needs.
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Mon Mar 05, 2018 3:13 pm

Hello bienvenu,
Yes, you can find PowerShell scripts in the StarWindX samples folder (C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell)
Feel free to modify them according to your needs.
Post Reply