A month ago to the day I wrote Announcing SDS Shell – Managing SDS from Powershell where I first talked of SDS Shell, a Powershell Snapin for interacting with SQL Data Services (SDS). Since then the SDS REST head has moved to a new root at https://data.database.windows.net/ so I have updated the code accordingly and done some clean-up refactoring too.
Here’s the info you need:
Once you have installed the suite you should be able to open Powershell and issue the command:
where you should see the SnapIn listed. Then issue the following to load the snapin into your Powershell session in order that you can use it:
Just for recap, here’s a rundown of the CmdLets that are installed with this Snapin:
| Cmdlet | Parameters | Description | Example |
| Get-SdsAuthorities | Username | Password | Query (Optional) | Returns a list of all your authorities. If <Query> is supplied then the list of containers will be filtered according to the query.* | Get-SdsAuthorities username password "from e in entities where e.Id == `"auth-name`" select e" |
| Get-SdsContainers | Username | Password | AuthorityName | Query (Optional) | Returns a list of all the containers in <AuthorityName>. If <Query> is supplied then the list of containers will be filtered according to the query.* | |
| Get-SdsEntities | Username | Password | AuthorityName | ContainerName |Query (Optional) | Returns a list of all the entities in <ContainerName> in <AuthorityName>. Any properties of the entity other than "Kind", "Id" & "Version" will be returned as an XML property bag. If <Query> is supplied then the list of entities will be filtered according to the query.* | |
| Add-SdsAuthority | Username | Password | AuthorityName | Creates an authority called <AuthorityName> | |
| Add-SdsContainer | Username | Password | AuthorityName | ContainerName | Creates a container called <ContainerName> in <AuthorityName> | |
| Remove-SdsContainer | Username | Password | AuthorityName | ContainerName | Removes a container called <ContainerName> from an authority called <AuthorityName> | |
-Jamie
UPDATE 2008-12-01: There were a few bugs in v2.0 (the perils of doing development when you should be asleep in bed) which are hopefully fixed in a later release that I’ve just committed, v0.2.1.
Get it from http://www.codeplex.com/sdssh/Release/ProjectReleases.aspx?ReleaseId=20057