PowerShell cmdlets for StarWind

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

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

Post Reply
miguel_
Posts: 4
Joined: Thu May 11, 2017 3:55 pm

Tue Jun 06, 2017 5:42 pm

Hi,
I have StarWind free edition and not have management console.
Need I install some package for admin the StarWind with PowerShell?
Which are the ps basic cmdlets for StarWind?.

Best Regards,
Ivan (staff)
Staff
Posts: 172
Joined: Thu Mar 09, 2017 6:30 pm

Fri Jun 09, 2017 8:06 pm

Hello miguel_,
Thanks for your interest in StarWind solution
All available information you can find in StarWindX folder C:\Program Files\StarWind Software\StarWind\StarWindX\Help
Yes, you need to install StarWindX Integration Component Library (PowerShell Management Library) in StarWind Installation Wizard to manage StarWind via PowerShell.
miguel_
Posts: 4
Joined: Thu May 11, 2017 3:55 pm

Wed Jul 26, 2017 12:15 am

I can´t find the cmdlets in that help.
Starwind-ServsNotConnected
Starwind-ServsNotConnected
Starwind-ServsNotConnected.png (7.12 KiB) Viewed 21422 times
How I can connect the server with powershell?.
Ivan (staff)
Staff
Posts: 172
Joined: Thu Mar 09, 2017 6:30 pm

Wed Jul 26, 2017 2:48 pm

Hello Miguel,
Thanks for your reply.
If your StarWind management console still exists it is enough to click "Connect" in the console.
In PowerShell scripts you can see strings below:

Code: Select all

Import-Module StarWindX

$server = New-SWServer -host 127.0.0.1 -port 3261 -user root -password starwind

try
{
    #Connection
    $server.Connect()
}
catch
{
    Write-Host "Exception $($_.Exception.Message)" -foreground red
}
finally
{
    if ( $server.Connected )
    {
        $server.Disconnect()
    }
}
That's means to perform the script we need to connect to StarWind service via loopback (local) or to the partner node performing any commands (which is supported in StarWindX) and disconnect from service.
StarWind management console is connecting to StarWind vSAN service via the different way. It means StarWind console and StarWindX is independent of each other.
diego
Posts: 4
Joined: Thu Sep 14, 2017 12:11 pm

Thu Sep 14, 2017 12:18 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 ?

thank you
Sergey (staff)
Staff
Posts: 86
Joined: Mon Jul 17, 2017 4:12 pm

Thu Sep 14, 2017 4:08 pm

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

Code: Select all

Import-Module StarWindX
$server = New-SWServer 127.0.0.1 3261 root starwind
$server.Connect()
StarWindX module is part of StarWind installation package.
Post Reply