Page 1 of 1

Powershell reference

Posted: Wed Apr 26, 2017 11:54 pm
by rrbnc
Is there a powershell reference guide for managing StarWind from the command line?

Re: Powershell reference

Posted: Thu Apr 27, 2017 3:50 pm
by Ivan (staff)
Hello rrbnc,
Thanks for interesting in StarWind solution
You can find all documentation about StarWindX in this folder - X:\Program Files\StarWind Software\StarWind\StarWindX\Help

Re: Powershell reference

Posted: Thu May 11, 2017 4:52 pm
by NetWise
Ivan (staff) wrote:Hello rrbnc,
Thanks for interesting in StarWind solution
You can find all documentation about StarWindX in this folder - X:\Program Files\StarWind Software\StarWind\StarWindX\Help
Am I not finding the PowerShell command reference in there? That location is particularly weak on PowerShell documentation of any sort.

Additionally this:

PS C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell> get-help starwindx | ft -autosize

Name Category Module Synopsis
---- -------- ------ --------
Add-HADevice Function StarWindX Creating New High Availability Device
Add-IBVDevice Function StarWindX Creating new thin-provisioned virtual device
Add-ImageDevice Function StarWindX Creating a new virtual device (ImageFile device).
Add-RamDevice Function StarWindX Creating a RAM disk
Add-VirtualTape Function StarWindX Add a new Virtual Tape to the existing Virtual Tape Library
Add-VirtualTapeLibrary Function StarWindX Creates a Virtual Tape Library
New-VTLFile Function StarWindX Creating an header file for a Virtual Tape Library

Is rather disappointing. Where are all the Get- and Remove- type of commands? Nothing there is configuring NIC's or IQN's or target groups or....?

Is the PowerShell module functionally complete at this time?

Re: Powershell reference

Posted: Mon May 15, 2017 5:43 pm
by Ivan (staff)
Hello NetWise,
Thanks for interesting in StarWind solution.
We will work on Help for StarWindX and in the next builds will be more samples and information about commands.

mount a snapshot programmatically

Posted: Mon May 29, 2017 2:33 pm
by rlaber
Hello,

I tried to do a simple task:

1. create a snapshot
2. copy some files out of it
3. remove that snapshot

Step 1 and 3 are easy with the well documented cmdlets new-snapshot and remove-snapshot. That works as expected.

But how can the snapshot be accessed with a powershell script? With the interactive GUI, I use the snapshot manager and press the Mount button. That creates a new device and a target. But I didn't find any documentation about how to perform this from within a powershell script. I guess, there is a special snapshot device to be created, assigned to a target that I can connect to and then access the files.

Is there any doc or example on how to do that. Can anybody help me?

Thanks in advance

Rudolf

Re: Powershell reference

Posted: Fri Jun 02, 2017 9:10 pm
by Michael (staff)
Hello Rudolf,

Unfortunately, the PowerShell script for mounting devices is still under development and will be available in the next builds.
We will keep the community posted once it will be available.

Re: Powershell reference

Posted: Sat Jun 09, 2018 11:06 am
by Chill0309
Michael (staff) wrote:Hello Rudolf,

Unfortunately, the PowerShell script for mounting devices is still under development and will be available in the next builds.
We will keep the community posted once it will be available.
Is this functionality now available in the latest build?

Re: Powershell reference

Posted: Tue Jun 12, 2018 3:18 pm
by Oleg(staff)
No, this functionality is not available yet.

Re: Powershell reference

Posted: Wed Jun 13, 2018 6:57 am
by Sekkmer
A few days ago I posted a library that can do this for LSFS devices here is the code in C# on line 53:

https://github.com/Sekkmer/StarWindXExt ... ensions.cs

Although it is in C# you can translate it to PowerShell only some syntax need to be changed.

As for HA snapshots, they work a bit differently and unfortunately, the parameters are shorted in the current StarWindX so the ("Async", "yes") is before the "MountSnaphot" parameter however for the server "MountSnaphot" must be the first.

This might actually work without the Async parameter, I haven't tested it yet.

Re: Powershell reference

Posted: Wed Jun 13, 2018 5:59 pm
by Boris (staff)
I believe what Oleg meant was that there is no official sample scripts for doing this. Sure, using your custom library may do the trick.

Re: Powershell reference

Posted: Sun Aug 19, 2018 6:54 am
by ayaanleo
Ken,

For this purpose you can use the two scripts from StarWindX. Their default path is "C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell\" and particular scripts that you need are GetHASyncState.ps1 to check the synchronization status and syncHaDevice.ps1 to synchronize it.

----------------------------
Top Rated Best Toys and Gifts for 5 Year Old Girls (Review) in 2020. Get the list of best toys Ideas for Five years old girls.

Re: Powershell reference

Posted: Mon Aug 20, 2018 3:39 pm
by Boris (staff)
It looks like that was posted to a wrong thread.