Project Description
The goal of this project is to create a PowerShell Oracle Business Intelligence Provider so that you could manage your OBI WebCatalog directly from the command line using well-known PS cmdlts and many new specific to OBI. It uses OBI SOAP web services only.
Marek Wiewiórka

Currently only the follwing cmdlets are supported:
#new drive example
New-PSDrive [-psprovider powerobiprovider -server "http://localhost/analytics/saw.dll" -username test -password test -name obi -root "/"]

Set-Location
Get-Location

Get-Acl

Get-Account [-drive -includeUsers -includeGroups]
New-Account  [-accountName - drive -groupAccount -userAccount]
Remove-Account [-accountName -drive]
Rename-Account [-oldName -newName -drive]

New-Item
Remove-Item [path -recurse]
Move-Item #works only within one OBI drive
Copy-Item #works only within one OBI drive (for copying between drives - OBI Servers use Migrate-Item cmdlt)
Migrate-Item [-source -target -force] #force to create non-existing path on the target - can be used to copy object between OBI servers(so PS drives)
Compare-Item [-source -target]
Get-Item
Get-ChildItem [-recurse]

Get-SubjectArea [-drive]
Get-SubjectAreaProperty [-saName -includeTables -includeTablesAndColumns -minimum -drive]

Invoke-OBISQL [-drive -obiSQL -maxRowsPerPage -direct] #as obiSQL you should provide a query in OBI logical SQL, -direct disables using OBI cache mechanism


TAB completion works as well.

TODO:
1. Error handling
2. Code cleanup & comments to the code & parameter sets
3. Other cmdlets
4. Help and examples
5. Wildcards support
6. PowerGUI PowerPack

Requirements:
1. Windows PowerShell 1.0 (probably will work with 2.0 - not tested)
2. Oracle Business Intelligence 10 (there are some discrepancies in API between OBI versions - tested against 10.1.3.4.
Please report if you come across problems with other versions.)

Installation:
1. installutil -i PowerOBIShell.dll

Reinstallation:
1. installutil -u PowerOBIShell.dll
2. installutil -i PowerOBIShell.dll

*in both case ensure you have path to installutil added to your env. PATH variable. (depending on your .NET version it should something like that X:\WINNT\Microsoft.NET\Framework\v2.0.50727\)

Usage:
PowerShell
1. Adding PowerOBIShellSnapin:
Add-PSSnapin PowerOBIShellSnapin
2. A new drive example:
New-PSDrive -psprovider powerobiprovider -server "http://localhost/analytics/saw.dll" -username test -password test -name obi -root "/"

Some use cases:
Get-ChildItem | Select-Object path #( ls | select path)
Get-Acl obi:\/shared | Select-Object Account,Right  #( Get-Acl obi:\/shared | select Account,Right)
Get-Account -drive obi -includeUsers   
#or if you are on the OBI drive then you may skip drive param - so simply 
Get-Account
New-Account GROUP-NAME-ADMIN  -drive obi 
New-Account GROUP-NAME-ADMIN
Remove-Account GROUP-NAME-ADMIN  -drive obi
Rename-Account GROUP-NAME-ADMIN GROUP-NAME-ADMIN2

Get-SubjectArea 
Get-SubjectAreaProperty "Subject Area Name" -minimum
Get-SubjectAreaProperty "Subject Area Name" -includeTables
Get-SubjectAreaProperty "Subject Area Name" -includeTablesAndColumns -drive obi
New-Item obi:\/shared/TEST/TEMP
Move-Item obi:\/shared/TEST/report obi:\/shared/TEST/TEMP
Copy-Item obi:\/shared/TEST/report obi:\/shared/TEST/TEMP

Last edited Dec 7, 2009 at 2:26 PM by mwiewiorka, version 42