FluentPro Help Center

What do you need help with?

Command Line Interface

USAGE

FluentPro.FluentBooks2013.exe <options> [parameters] or FluentPro.FluentBooks2013.exe <filename>.

Please note: Command Line Interface of FluentBooks provides a lite kit of features and can be used for regular and simple actions, such as partial migration of PWA configuration and PWA configuration comparison.
Command Line Interface of FluentBooks is not intended for full migrations, since it does not support many of the standard and additional features.

Options

  • -?
  • -h
  • -help ;show usage
  • -close_app ;close application after operation complete
  • -script ;run PowerShell script with fb object
  • -silent ;work in silent mode (return only errorcode, no console output)
  • -wait ;waits until the user press key in the end
  • -compare ;compare if two workspaces are identical. Must be used with '-source' and '-source2'
  • -source ; use this to compare workspaces or upload its contents to the server
  • -source2 ; use this as 2nd workspace to compare with
  • -destination ; use this to download items from server (type=workspace) or upload data to the server (type=server)

Parameters for source, source2, destination options

  • type=“file” or type=“server”
  • file=“<file name>”
  • url=“<url for server>” login=“<login>” password=“<password>” the system will use Windows authorization if login is not specified.
  • items=“all” specify all workspace elements for import, export or compare. “All” is default value.
  • items=“<letters>” where <letters> is set of elements to be downloaded/uploaded:
    • p=projects
    • f=fields
    • l=lookups
    • e=enterprise project types
    • d=PDPs
    • v=views
    • r=resources
    • g=groups
    • c=categories
    • t=security templates
    • o=PWA permissions
    • w=workflows
    • s=strategy
    • m=time management

Ignore “items=”<letters>“” command, if you wish to download/upload all items.

Command line interface does not support project compare.

Return values

  • 0 = no error
  • 1 = compare workspaces: identical
  • 2 = compare workspaces: different
  • 3 = error

Examples

Open workspace on application start:

FluentPro.FluentBooks2013.exe <file>.fbwx2

Download config from source PWA to the file on your PC:

FluentPro.FluentBooks2013.exe -source type="server" url="<url>" login="<login>" password="<password>" -destination type="file" file="c:\<file>.fbwx2"

Upload config from file on your PC to the target PWA:

FluentPro.FluentBooks2013.exe -source type="file" file="c:\<file>.fbwx2" -destination type="server" url="<url>" login="<login>" password="<password>"

Migrate config from one server (PWA) to another:

FluentPro.FluentBooks2013.exe -source type="server" url="<url>" login="<login>" password="<password>" -destination type="server" url="<url2>" login="<login2" password="<password2>"

Compare fields in two workspace files:

 FluentPro.FluentBooks2013.exe -compare -source type="file" file="c:\<file>.fbwx2" items=f -source2 type="file" file="c:\<file2>.fbwx2" items=f 

In silent mode compare fields, lookups, project types between file and server:

 FluentPro.FluentBooks2013.exe -silent -compare -source type="file" file="c:\<file>.fbwx2" items=flt -source2 type="server" url="<url>" login="<login>" password="<password>" items=flt 

Upload config (fields, lookups, project types) from file to server:

 FluentPro.FluentBooks2013.exe -source type="file" file="c:\<file>.fbwx2" items=flt -destination type="server" url="<url>" login="<login>" password="<password>" items=flt 

Custom actions with Powershell script

Usage:

FluentPro.FluentBooks2013.exe -script script.ps1 -close_app 

Example of PowerShell script

Open workspace, select project(s) and upload workspace to target PWA

$workspace = $fb.OpenWorkspaceFromFile("C:\\temp\\1.fbwx2"); foreach ($project in $workspace.Projects){ if($project.ProjectName -eq "Project 1"){ $project.Selected = $true; } else{ $project.Selected = $false; } } $fb.UploadWorkspaceToPWA("http://localhost/pwa", "login", "password", "Projects"); 

Import Resources data from excel file, save workspace to file, upload data to PWA

$fb.WriteToLog('Import Resources data from excel file'); $fb.ImportDataFromExcelFile('c:\resources.xlsx', 'Resources'); $fb.WriteToLog('Resources count=' + $fb.Workspace.Resources.Count.ToString() );
$fb.WriteToLog('Save workspace to file'); $fb.SaveWorkspaceToFile('w-res.fbwx2');
$fb.WriteToLog('Upload data to PWA'); $fb.UploadWorkspaceToPWA('http://host/pwa', 'login', 'password', 'Resources');
$fb.WriteToLog('Done'); $fb.Workspace.Clear(); 

Export Resources To Excel

$workspace = $fb.DownloadWorkspaceFromPWA("http://localhost/pwa", "CurrentUser", "", "", "Resources");
foreach($res in $workspace.Resources)
{
 $res.Selected = $true;
}
$fb.ExportDataToExcelFile("C:\\temp\\Resources.xlsx", "Resources");

Update Resource Rate

$workspace = $fb.DownloadWorkspaceFromPWA("http://localhost/pwa", "CurrentUser", "", "", "Resources");
$resourceEmployee1 = $workspace.Resources | Where { $_.ResourceName -eq "employee1" } | Select -First 1
if($resourceEmployee1 -ne $null)
{
 $rate1 = $resourceEmployee1.Rates | Where { ($_.RateEffectiveDate -ne $null) -and ($_.RateEffectiveDate.Date -eq (get-date 2016-01-01)) } | Select -First 1
 if($rate1 -ne $null)
 {
 $rate1.StandardRate = $rate1.StandardRate + 1;
 $rate1.OvertimeRate = $rate1.OvertimeRate + 1;
 $resourceEmployee1.Selected = $true;
 }
}
$fb.UploadWorkspaceToPWA("http://localhost/pwa", "CurrentUser", "", "", "Resources");

Import Resources From Excel

$fb.ImportDataFromExcelFile("C:\\temp\\Resources.xlsx", "Resources");
foreach($res in $fb.Workspace.Resources)
{
 $res.Selected = $true;
}
$fb.UploadWorkspaceToPWA("http://localhost/pwa", "CurrentUser", "", "", "Resources");

Publish all projects that were modified during the previous day

 $pwa = "http://server/PWA"
$authenticationType = "CurrentUser" # available types: CurrentUser, WindowsAuthentication, Office365
$login = "login"
$password = "password"
$projects = $fb.ProjectServer.GetProjectList($pwa, $authenticationType, $login, $password)
$fb.WriteToLog("All projects: " + $projects.Count)
$yesterday = (Get-Date).AddDays(-1)
$projectsToPublish = $projects | Where-Object {$_.Modified -ge $yesterday}
$fb.WriteToLog("To publish: " + $projectsToPublish.Count)
$fb.ProjectServer.PublishProjects($projectsToPublish, $pwa, $authenticationType, $login, $password)

Download PWA configuration

$pwa = 'http://localhost/pwa'
$authenticationType = 'CurrentUser' # available types: CurrentUser, WindowsAuthentication, Office365
$login = '' # For Windows Authentication use domain\username
$password = ''
$workspaceFilePath = 'c:\temp\newWorkspace.fbwx2'
$fb.DownloadWorkspaceFromPWA($pwa, $authenticationType, $login, $password, 'Fields,Lookups')
#available options: 'Projects,Fields,Lookups,ProjectTypes,Pages,Views,SecurityGroups,SecurityCategories,SecurityTemplates,WorkflowStages,WorkflowPhases,WebAppPermissions,Resources,TimeReportingPeriods,TimesheetSettings,TaskSettings,BusinessDrivers,BusinessDriverPrioritizations,PortfolioAnalyses,FiscalYears,LineClassifications,AdministrativeTime,Olap,TimesheetManagers,Workflows,Dependencies,ProjectsTimeline,Calendars,QuickLaunch,Delegation,GroupingFormat,GanttChartFormat'
$fb.SaveWorkspaceToFile($workspaceFilePath)

Upload PWA Configuration

$pwa = 'http://localhost/pwa'
$authenticationType = 'CurrentUser' # available types: CurrentUser, WindowsAuthentication, Office365
$login = '' # For Windows Authentication use domain\username
$password = ''
$workspaceFilePath = 'c:\temp\newWorkspace.fbwx2'
$fb.OpenWorkspaceFromFile($workspaceFilePath)
$fb.UploadWorkspaceToPWA($pwa, $authenticationType, $login, $password, 'Fields,Lookups')
#available options: 'Projects,Fields,Lookups,ProjectTypes,Pages,Views,SecurityGroups,SecurityCategories,SecurityTemplates,WorkflowStages,WorkflowPhases,WebAppPermissions,Resources,TimeReportingPeriods,TimesheetSettings,TaskSettings,BusinessDrivers,BusinessDriverPrioritizations,PortfolioAnalyses,FiscalYears,LineClassifications,AdministrativeTime,Olap,TimesheetManagers,Workflows,Dependencies,ProjectsTimeline,Calendars,QuickLaunch,Delegation,GroupingFormat,GanttChartFormat'

Was this article helpful?

Table of contents

    Back To Top