Latest Tweets

Find Posts by Category
Find Posts by Tag
Twitter

Entries in powershell (2)

Wednesday
Jul262006

Using Powershell to manage Alchemy - Add local users to a Role

Today in an Captaris Alchemy class I got an interesting question. One of the students has a customer who wants to use local users instead of domain users when setting up integrated security. Integrated security is where you can authorize users to view databases, folders, and/or files based on the username they are logged in as. Normally associating the database ‘roles’ with domain users makes the most sense, but occasionally there is a need to set up local users. Now the problem is that the Server Console UI doesn’t allow for anything other than domain users. So the only way to add a local user is through the Alchemy API. Before Powershell that would have probably meant breaking out Visual Studio. But now I think it is far easier to deal with. Here is a sample script that will take two parameters: a role name you want to add a user to, and a user name in the format servername\username.

param($role=$(Throw "A role name is required..."),

Click to read more ...

Friday
Jul212006

Using PowerShell to Admin Captaris Workflow

The other day I started looking into using PowerShell to help manage Captaris Workflow. The toughest part about coming up with any administration tool is imagining all the different tasks people might want to accomplish. One of the wonderful things about Powershell is that you don’t have to really know the details of how users want to manipulate the information. All you need to do is give the basic building blocks that can then be piped together to make something amazing. That was always the cool thing about piping commands in Unix. None of the individual utilities did much, but when piped together you could get amazing things done.

Anyway, one of the common tasks that Captaris Workflow admins like to do is to move old processes to an archive folder. We can do that via the GUI, but it is a multiple step process. So I created two simple Powershell scripts that will move any file, folder, process, or model from one location to another based on name, id, date modified, date created, owner, original location, and more. And to make it even better the two scripts together add up to 15 lines of code. If you only count the unique lines, its down to 9 lines.

So first off we want to get the list of records off the Workflow Server:

param($user=$(Throw "A user is required..."),$pwd="")
[void][System.Reflection.Assembly]::LoadWithPartialName("TeamplateBLL") |out-null
$s = New-Object Teamplate.BLL.BSession
$s.Connect($user,$pwd)

Click to read more ...