0% found this document useful (0 votes)
11 views31 pages

GPPower Shell

Uploaded by

OldQuake Gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views31 pages

GPPower Shell

Uploaded by

OldQuake Gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Microsoft Dynamics GP 2013 R2

PowerShell Users Guide


Copyright Copyright © 2014 Microsoft. All rights reserved.

Limitation of liability This document is provided “as-is”. Information and views expressed in this document, including
URL and other Internet Web site references, may change without notice. You bear the risk of using
it.

Some examples depicted herein are provided for illustration only and are fictitious. No real
association or connection is intended or should be inferred.

Intellectual property This document does not provide you with any legal rights to any intellectual property in any
Microsoft product.

You may copy and use this document for your internal, reference purposes.

Trademarks Microsoft, Microsoft Dynamics, Windows, and Windows Server are trademarks of the Microsoft
group of companies. FairCom and c-tree Plus are trademarks of FairCom Corporation and are
registered in the United States and other countries.

All other trademarks are property of their respective owners.

Warranty disclaimer Microsoft Corporation disclaims any warranty regarding the sample code contained in this
documentation, including the warranties of merchantability and fitness for a particular purpose.

License agreement Use of this product is covered by a license agreement provided with the software product. If you
have any questions, please call the Microsoft Dynamics GP Customer Assistance Department at
800-456-0025 (in the U.S. or Canada) or +1-701-281-6500.

Publication date May 2014


Contents
Introduction ................................................................................................................................................. 1
What’s in this manual...................................................................................................................................1
Product support ............................................................................................................................................1
Symbols and conventions ............................................................................................................................1

Chapter 1: Installation ................................................................................................................... 3


Prerequisites...................................................................................................................................................3
Installing Microsoft Dynamics GP PowerShell ........................................................................................3

Chapter 2: Using PowerShell ............................................................................................... 5


Starting PowerShell ......................................................................................................................................5
Getting a list of commands..........................................................................................................................5
What to do next .............................................................................................................................................6

Chapter 3: Microsoft Dynamics GP Cmdlets.................................................. 7


Add-GPScaleGroupTenant ..................................................................................................................8
Get-GPScaleGroup................................................................................................................................9
Get-GPScaleGroupTenant..................................................................................................................10
Get-GPSessionCentralAddress ......................................................................................................... 11
Get-GPSessionHost.............................................................................................................................12
Get-GPSessionHostTenant.................................................................................................................13
Get-GPSessions....................................................................................................................................14
Get-GPWebClientVersion...................................................................................................................15
New-GPScaleGroup ...........................................................................................................................16
Remove-GPScaleGroup......................................................................................................................17
Remove-GPScaleGroupTenant..........................................................................................................18
Remove-GPSessionHost ....................................................................................................................19
Set-GPSessionCentralAddress ..........................................................................................................20
Update-GPScaleGroup .......................................................................................................................21
Update-GPScaleGroupTenant ...........................................................................................................22
Update-GPSessionHost......................................................................................................................23
Update-GPSessionHostTenant..........................................................................................................25

Index ................................................................................................................................................................... 27

P O W E R S H E L L U S E R S G U I D E i
ii P O W E R S H E L L U S E R S G U I D E
Introduction
The Microsoft Dynamics GP 2013 PowerShell module provides PowerShell cmdlets
to perform various configuration tasks for a Microsoft Dynamics GP installation.

What’s in this manual


The Microsoft Dynamics GP PowerShell Users Guide explains how to get started
with the PowerShell module. It also provides reference information for the
PowerShell cmdlets that are available in the module. The manual is divided into the
following chapters:

• Chapter 1, “Installation,” explains how to install the Microsoft Dynamics GP


2013 PowerShell module.

• Chapter 2, “Using PowerShell,” describes how to begin working with the


PowerShell module.

• Chapter 3, “Microsoft Dynamics GP Cmdlets,” provides detailed information


about the cmdlets included in the module.

Product support
Technical support for the Microsoft Dynamics GP PowerShell module can be
accessed by the following methods:

• Telephone support – Technical Support at (888) 477-7877 between 8:00 a.m.


and 5:00 p.m. Central Time, Monday through Friday. International users can
contact Technical Support at (701) 281-0555.

• Internet – Technical Support is also available online through CustomerSource


or PartnerSource, and is accessible from www.microsoft.com/Dynamics/GP.

Symbols and conventions


To help you use this documentation more effectively, we’ve used the following
symbols and conventions to make specific types of information stand out.

Symbol Description
The light bulb symbol indicates helpful tips, shortcuts
and suggestions.

Warnings indicate situations you should be especially


aware of.

Margin notes summarize Margin notes call attention to critical information, and
important information. direct you to other areas of the documentation where a
topic is explained.

Convention Description
Chapter 1, “Installation” Quotation marks indicate a chapter name.
Setting window fields Italicized type indicates a section name.
set 'l_Item' to 1. This font is used for code examples.
RUNTIME.EXE Words in uppercase indicate a file name.

P O W E R S H E L L U S E R S G U I D E 1
2 P O W E R S H E L L U S E R S G U I D E
Chapter 1: Installation
This portion of the documentation explains how to install the Microsoft Dynamics
GP PowerShell module. The following topics are discussed:

• Prerequisites
• Installing Microsoft Dynamics GP PowerShell

Prerequisites
To use the Microsoft Dynamics GP PowerShell module, you must have PowerShell
3.0 installed. This version of PowerShell is included with Windows Server 2012. If
you are using an earlier release of Windows, you will need to install this version of
PowerShell.

1. Go to the Microsoft Download Center.


To get PowerShell 3.0, go to the Microsoft Download Center:

http://www.microsoft.com/download

2. Search for “Windows Management Framework 3.0”.


This collection of tools contains PowerShell 3.0. Choose to download this
software.

3. Choose the download to install.


The download you choose will depend on the version of Windows that you are
using. For example, if you are using Server 2008 R2 (a 64-bit operating system)
then you would choose the Windows 6.1 x64 download.

4. Install the software.


Complete the steps to install the Windows Management Framework.

Installing Microsoft Dynamics GP PowerShell


To install the Microsoft Dynamics GP PowerShell module, use one of the following
procedures.

If Microsoft Dynamics GP is installed


If Microsoft Dynamics GP is installed on the system where you are going to install
the PowerShell module, complete these steps.

1. Run the Microsoft Dynamics GP installer.


From the Microsoft Dynamics GP installation media, double-click the Setup.exe
file to open the Microsoft Dynamics GP installation window.

2. Choose to install GP PowerShell.


Click GP PowerShell and then click Install.

3. Install the PowerShell module.


Click Install to install the Microsoft Dynamics GP 2013 PowerShell module.

4. Complete the installation.


Click Finish to complete the installation.

P O W E R S H E L L U S E R S G U I D E 3
C H A P T E R 1 I N S T AL LA T IO N

If Microsoft Dynamics GP is not installed


If no Microsoft Dynamics GP components are installed on the system where you are
going to install the PowerShell module, complete these steps. They allow you to
install the PowerShell module without having to install Microsoft Dynamics GP
prerequisites that aren’t needed.

1. Locate the Microsoft Dynamics GP PowerShell installer.


You can find the installer on the Microsoft Dynamics GP installation media in
the following location:

\AdProd\GPPowerShell\

2. Run the Microsoft Dynamics GP PowerShell installer.


The file is named Microsoft_DynamicsGP12_PowerShell.msi.

3. Install the PowerShell module.


Click Install to install the Microsoft Dynamics GP 2013 PowerShell module.

4. Complete the installation.


Click Finish to complete the installation.

4 P O W E R S H E L L U S E R S G U I D E
Chapter 2: Using PowerShell
This portion of the documentation discusses how to use the Microsoft Dynamics GP
2013 PowerShell module. The following topics are discussed:

• Starting PowerShell
• Getting a list of commands
• What to do next

Starting PowerShell
To start the command prompt for the Microsoft Dynamics GP 2013 PowerShell
module, do one of the following:

• Choose Start >> All Programs >> Microsoft Dynamics >> GP PowerShell >>
Microsoft Dynamics GP 2013 PowerShell

• On the Start screen, choose Microsoft Dynamics GP 2013 PowerShell

The Microsoft Dynamics GP 2013 PowerShell command prompt will be displayed.

Getting a list of commands


To get a list of the commands that are available in the Microsoft Dynamics GP 2013
PowerShell module, type the following command:

Get-Command -module GP2013

A list of the available commands will be displayed. To get detailed information


about each command, use the Get-Help cmdlet. For example:

Get-Help Set-GPSessionCentralAddress

To display all of the help information for a cmdlet, include the -full parameter:

Get-Help New-GPScaleGroup -full

P O W E R S H E L L U S E R S G U I D E 5
C H A P T E R 2 U S I N G P O W E R S H EL L

What to do next
It’s up to you to decide which tasks you want to perform with the PowerShell
cmdlets. For example, the “scale groups” functionality for the multitenant Microsoft
Dynamics GP web client is configured using PowerShell cmdlets. Refer to the
Chapter 3, “Microsoft Dynamics GP Cmdlets,” for information about the cmdlets
that are available in the PowerShell module.

6 P O W E R S H E L L U S E R S G U I D E
Chapter 3: Microsoft Dynamics GP Cmdlets
The following cmdlets are available for Microsoft Dynamics GP:

• Add-GPScaleGroupTenant
• Get-GPScaleGroup
• Get-GPScaleGroupTenant
• Get-GPSessionCentralAddress
• Get-GPSessionHost
• Get-GPSessionHostTenant
• Get-GPSessions
• Get-GPWebClientVersion
• New-GPScaleGroup
• Remove-GPScaleGroup
• Remove-GPScaleGroupTenant
• Remove-GPSessionHost
• Set-GPSessionCentralAddress
• Update-GPScaleGroup
• Update-GPScaleGroupTenant
• Update-GPSessionHost
• Update-GPSessionHostTenant

P O W E R S H E L L U S E R S G U I D E 7
A D D - G P S C A L E G R O U P T E N A N T

Add-GPScaleGroupTenant
Description Adds a tenant to a scale group. The cmdlet accepts the name of the tenant as well as
either the scale group Id or the scale group name for which to assign the tenant.

Syntax Add-GPScaleGroupTenant -TenantName <String> -ScaleGroupId <Int32>


[<CommonParameters>]

Add-GPScaleGroupTenant -TenantName <String> -ScaleGroupName <String>


[<CommonParameters>]

Parameters • -TenantName <String>


The name of the tenant to be added to the scale group.

• -ScaleGroupId <Int32>
The Id of the scale group to which the tenant will be added.

• -ScaleGroupName <String>
The name of the scale group to whichthe tenant will be added.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Examples Example 1 adds Tenant1 to the default scale group.

Add-GPScaleGroupTenant -ScaleGroupName "Default Group" -TenantName "Tenant1"

Example 2 adds Tenant1 to the scale group with an Id of 2.

Add-GPScaleGroupTenant -ScaleGroupId 2 -TenantName "Tenant1"

8 P O W E R S H E L L U S E R S G U I D E
G E T - G P S C A L E G R O U P

Get-GPScaleGroup
Description Retrieves a single scale group or a list of scale groups.

Syntax Get-GPScaleGroup [[-ScaleGroupId] <Int32>] [<CommonParameters>]

Get-GPScaleGroup [-ScaleGroupName <String>] [<CommonParameters>]

Parameters • -ScaleGroupId <Int32>


The Id of the scale group to retrieve.

• -ScaleGroupName <String>
The name of the scale group to retrieve.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Get-GPScaleGroup cmdlet returns the properties for a single scale group if the
Id or name parameters are provided. If parameters are not provided, a list of all
scale groups and their properties is returned.

Examples Example 1 returns the properties for the default scale group.

Get-GPScaleGroup -ScaleGroupName "Default Group"

Example 2 returns a list of all scale groups and their properties.

Get-GPScaleGroup

P O W E R S H E L L U S E R S G U I D E 9
G E T - G P S C A L E G R O U P T E N A N T

Get-GPScaleGroupTenant
Description Retrieves the list of tenants that are assigned to a scale group.

Syntax Get-GPScaleGroupTenant [-TenantName <String>] [<CommonParameters>]

Get-GPScaleGroupTenant [-ScaleGroupId <Int32>] [-ScaleGroupName <String>]


[<CommonParameters>]

Parameters • -TenantName <String>


The name of the tenant for which to return the scale group assignment.

• -ScaleGroupId <Int32>
The Id of the scale group for which to return assignments.

• -ScaleGroupName <String>
The name of the scale group for which to return assignments.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments If the tenant name is provided, then a single assignment will be returned, provided
that the tenant has been assigned to a scale group. If the scale group name or Id is
provided, the Get-GPScaleGroupTenant cmdlet returns the list of tenants that are
assigned to that single scale group. If no parameter is supplied, a list of all scale
group assignments for all tenants will be returned.

Examples Example 1 returns the list of tenant assignments for the default scale group.

Get-GPScaleGroupTenant -ScaleGroupName "Default Group"

Example 2 returns a list of all scale group assignments for all tenants.

Get-GPScaleGroupTenant

Example 3 returns the scale group assignment for Tenant1.

Get-GPScaleGroupTenant -TenantName "Tenant1"

10 P O W E R S H E L L U S E R S G U I D E
G E T - G P S E S S I O N C E N T R A L A D D R E S S

Get-GPSessionCentralAddress
Description Retrieves the address (URL) for the Session Central Service that is being accessed by
the PowerShell cmdlets. This value was set by the Set-GPSessionCentralAddress
cmdlet.

Syntax Get-GPSessionCentralAddress [<CommonParameters>]

Parameters • <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Examples The following example retrieves the address that had been specified as the Session
Central Service to access.

Get-GPSessionCentralAddress

P O W E R S H E L L U S E R S G U I D E 11
G E T - G P S E S S I O N H O S T

Get-GPSessionHost
Description Retrieves information about a session host or a list of session hosts.

Syntax Get-GPSessionHost [[-SessionHostId] <String>]


[-OnlyActive [<SwitchParameter>]] [-OnlyInactive [<SwitchParameter>]]
[<CommonParameters>]

Get-GPSessionHost [-ScaleGroupId <Int32>] [-ScaleGroupName <String>]


[-OnlyActive [<SwitchParameter>]] [-OnlyInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -SessionHostId <String>


The Id of the session host to return.

• -OnlyActive [<SwitchParameter>]
If present, returns only active session hosts.

• -OnlyInactive [<SwitchParameter>]
If present, returns only inactive or suspended session hosts.

• -ScaleGroupId <Int32>
The Id of the scale group on which to filter the returned session hosts.

• -ScaleGroupName <String>
The name of the scale group on which to filter the return session hosts.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Get-GPSessionHost cmdlet returns the session hosts for the specified session
host or scale group if either are provided. Otherwise, it returns all session hosts.

Examples Example 1 returns the properties for the session host with Id SessionHost1.

Get-GPSessionHost -SessionHostId "SessionHost1"

Example 2 returns a list of all session hosts and their properties.

Get-GPSessionHost

Example 3 returns the properties for all session hosts that are assigned to the default
scale group.

Get-GPSessionHost -ScaleGroupName "Default Group"

Example 4 returns the properties for all inactive session hosts.

Get-GPSessionHost -OnlyInactive

12 P O W E R S H E L L U S E R S G U I D E
G E T - G P S E S S I O N H O S T T E N A N T

Get-GPSessionHostTenant
Description Retrieves the tenant assignment and status of a session host.

Syntax Get-GPSessionHostTenant [-SessionHostId <String>] [-TenantName <String>]


[<CommonParameters>]

Parameters • -SessionHostId <String>


The session host Id on which to filter assignments.

• -TenantName <String>
The tenant name on which to filter assignments.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Get-GPSessionHostTenant cmdlet returns a list of tenant to session host


assignments for the provided session host or tenant. If neither is provided, then it
returns all assignments for all tenants and session hosts.

Examples Example 1 returns a list of tenant assignments for the session host with Id
SessionHost1.

Get-GPSessionHostTenant -SessionHostId "SessionHost1"

Example 2 returns all session host assignments for Tenant1.

Get-GPSessionHostTenant -TenantName "Tenant1"

P O W E R S H E L L U S E R S G U I D E 13
G E T - G P S E S S I O N S

Get-GPSessions
Description Retrieves the current sessions on one or more session hosts.

Syntax Get-GPSessions [[-SessionHostId] <String>] [-OnlyActive [<SwitchParameter>]]


[-OnlyInactive [<SwitchParameter>]] [<CommonParameters>]

Get-GPSessions [-ScaleGroupId <Int32>] [-ScaleGroupName <String>]


[-OnlyActive [<SwitchParameter>]] [-OnlyInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -SessionHostId <String>


The name of the session host to get current sessions for.

• -OnlyActive [<SwitchParameter>]
If present, returns only active sessions.

• -OnlyInactive [<SwitchParameter>]
If present, returns only inactive sessions.

• -ScaleGroupId <Int32>
The Id of the scale group for which to get sessions.

• -ScaleGroupName <String>
The name of the scale group for which to get sessions.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Get-GPSessions cmdlet returns all sessions found on the specified session host
or scale group if either are provided. Otherwise, it returns all sessions. Providing
the -OnlyActive or -OnlyInactive switch parameters filters sessions based on their
status.

Examples Example 1 returns both active and inactive sessions on the session host with Id
SessionHost1.

Get-GPSessions -SessionHostId "SessionHost1"

Example 2 returns both active and inactive sessions on all of the session hosts in the
default scale group.

Get-GPSessions -ScaleGroupName "Default Group"

Example 3 returns all inactive sessions on all session hosts.

Get-GPSessions -OnlyInactive

Example 4 returns inactive sessions on all session hosts in the default scale group.

Get-GPSessions -OnlyInactive -ScaleGroupName "Default Group"

14 P O W E R S H E L L U S E R S G U I D E
G E T -G PW E B C L I E N T V E R S I O N

Get-GPWebClientVersion
Description Retrieves the version information for the Microsoft Dynamics GP Web Client that is
installed.

Syntax Get-GPWebClientVersion [<CommonParameters>]

Parameters • <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Examples The following example retrieves the version information for the Microsoft
Dynamics GP Web Client that is installed.

Get-GPWebClientVersion

P O W E R S H E L L U S E R S G U I D E 15
N E W -G PS C A L E G R O U P

New-GPScaleGroup
Description Creates a new scale group.

Syntax New-GPScaleGroup -ScaleGroupName <String> [-Description <String>]


[-SetInactive [<SwitchParameter>]] [<CommonParameters>]

Parameters • -ScaleGroupName <String>


The name of the scale group to create.

• -Description <String>
The description of the scale group to create.

• -SetInactive [<SwitchParameter>]
Indication to set the status of the scale group to inactive.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The New-GPScaleGroup cmdlet accepts the name and description for a scale group
to create. The created scale group is active by default. To set the status to inactive,
provide the -SetInactive switch parameter.

Examples Example 1 creates a scale group with the provided name and description. The status
of the scale group is set to active by default.

New-GPScaleGroup -ScaleGroupName "ScaleGroup1" -Description "Description for


Scale Group 1"

Example 2 creates a scale group with the provided name and description. The status
of the scale group is set to inactive.

New-GPScaleGroup -ScaleGroupName "ScaleGroup2" -Description "Description for


Scale Group 2" –SetInactive

16 P O W E R S H E L L U S E R S G U I D E
R E M O V E - G P S C A L E G R O U P

Remove-GPScaleGroup
Description Deletes one or more scale groups.

Syntax Remove-GPScaleGroup -ScaleGroupId <Int32> [-Force [<SwitchParameter>]]


[-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]]
[<CommonParameters>]

Remove-GPScaleGroup -ScaleGroupName <String> [-Force [<SwitchParameter>]]


[-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]]
[<CommonParameters>]

Remove-GPScaleGroup [-ScaleGroups] <ScaleGroup[]>


[-Force [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[-Confirm [<SwitchParameter>]] [<CommonParameters>]

Parameters • -ScaleGroupId <Int32>


The Id of the scale group to delete.

• -Force [<SwitchParameter>]
Executes the command without prompting for confirmation.

• -WhatIf [<SwitchParameter>]
Displays a message that describes the effect of the command, instead of executing
the command.

• -Confirm [<SwitchParameter>]
Prompts for confirmation before executing the command.

• -ScaleGroupName <String>
The name of the scale group to delete.

• -ScaleGroups <ScaleGroup[]>
A list of scale groups to delete. See example 3 for usage.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Remove-GPScaleGroup cmdlet deletes the specified scale group or groups.
There must not be any session hosts assigned to the specified scale groups.

Examples Example 1 removes the scale group with the name ScaleGroup1.

Remove-GPScaleGroup -ScaleGroupName "ScaleGroup1"

Example 2 removes the scale group with the Id 5.

Remove-GPScaleGroup -ScaleGroupId 5

Example 3 removes all of the scale groups.

Get-GPScaleGroup | Remove-GPScaleGroup

P O W E R S H E L L U S E R S G U I D E 17
R E M O V E -G PS C A L E G R O U P T E N A N T

Remove-GPScaleGroupTenant
Description Removes a tenant from a scale group.

Syntax Remove-GPScaleGroupTenant -TenantName <String>


[-Force [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[-Confirm [<SwitchParameter>]] [<CommonParameters>]

Remove-GPScaleGroupTenant -Assignments <ScaleGroupTenantAssignment[]>


[-Force [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[-Confirm [<SwitchParameter>]] [<CommonParameters>]

Parameters • -TenantName <String>


The name of the tenant to remove.

• -Force [<SwitchParameter>]
Executes the command without prompting for confirmation.

• -WhatIf [<SwitchParameter>]
Displays a message that describes the effect of the command instead of executing
the command.

• -Confirm [<SwitchParameter>]
Prompts for confirmation before executing the command.

• -Assignments <ScaleGroupTenantAssignment[]>
A list of tenant to scale group assignments to delete. See example 2 for usage.

• <CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216).

Comments The Remove-GPScaleGroupTenant cmdlet deletes the scale group assignment for
the specified tenant. When no scale group assignment exists for a tenant, Session
Central will use the default scale group for the tenant.

Examples Example 1 removes the scale group assignment for Tenant1. After the command has
finished, Tenant1 is assumed to be part of the default scale group.

Remove-GPScaleGroupTenant -TenantName "Tenant1"

Example 2 removes all scale group assignments for all tenants that are assigned to
the scale group with the Id 1.

Get-GPScaleGroupTenant -ScaleGroupId 1 | Remove-GPScaleGroupTenant

18 P O W E R S H E L L U S E R S G U I D E
R E M O V E - G P S E S S I O N H O S T

Remove-GPSessionHost
Description Deletes the specified session host so that the Session Central Service will no longer
be able to use it. The session host must not have any active sessions.

Syntax Remove-GPSessionHost [-SessionHostId] <String> [-Force [<SwitchParameter>]]


[-WhatIf [<SwitchParameter>]] [-Confirm [<SwitchParameter>]]
[<CommonParameters>]

Remove-GPSessionHost [-SessionHosts] <SessionHost[]>


[-Force [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[-Confirm [<SwitchParameter>]] [<CommonParameters>]

Parameters • -SessionHostId <String>


The Id of the session host to delete.

• -Force [<SwitchParameter>]
Executes the command with prompting for confirmation.

• -WhatIf [<SwitchParameter>]
Displays a message that describes the effect of the command instead of executing
the command.

• -Confirm [<SwitchParameter>]
Prompts you for confirmation before executing the command.

• -SessionHosts <SessionHost[]>
A list of session hosts to delete. See example 2 for usage.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Examples Example 1 removes the session host with an Id of SessionHost1.

Remove-GPSessionHost -SessionHostId "SessionHost1"

Example 2 removes all of the session hosts that are assigned to the default scale
group.

Get-GPSessionHost -ScaleGroupName "Default Group" | Remove-GPSessionHost

P O W E R S H E L L U S E R S G U I D E 19
S E T - G P S E S S I O N C E N T R A L A D D R E S S

Set-GPSessionCentralAddress
Description Specifies the Session Central Service that will be accessed by the PowerShell
cmdlets.

Syntax Set-GPSessionCentralAddress [-Address] <String>[<CommonParameters>]

Parameters • [-Address] <String>


Specifies the URL of the Session Central Service that will be accessed.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Comments You must have proper permission to run cmdlets that access the Session Central
Service. Typically, the account that was specified to run the Session Central Service
at the time the Microsoft Dynamics GP Web Client web site was installed will have
access. Any users in the local machine Administrators group will also have access.

The address is not verified when the cmdlet is run. If an incorrect address is
supplied, you will see errors when the other cmdlets are used.

Examples The following example specifies that the PowerShell cmdlets will use the Session
Central Service on the gpweb.conto.com server.

Set-GPSessionCentralAddress -Address http://gpweb.contoso.com:48650/


SessionCentralService

20 P O W E R S H E L L U S E R S G U I D E
U P D A T E - G P S C A L E G R O U P

Update-GPScaleGroup
Description Updates properties for an existing scale group.

Syntax Update-GPScaleGroup [-ScaleGroupId] <Int32> [-ScaleGroupName <String>]


[-Description <String>] [-SetActive [<SwitchParameter>]]
[-SetInactive [<SwitchParameter>]] [<CommonParameters>]

Update-GPScaleGroup -ScaleGroups <ScaleGroup[]> [-SetActive


[<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -ScaleGroupId <Int32>


The Id of the scale group to update.

• -ScaleGroupName <String>
The new value for the name of the scale group.

• -Description <String>
The new value for the description of the scale group.

• -SetActive [<SwitchParameter>]
If present, sets the scale group to active.

• -SetInactive [<SwitchParameter>]
If present, sets the scale group to inactive.

• -ScaleGroups <ScaleGroup[]>
A list of scale groups to update. This can only be used with the -SetActive and
-SetInactive switch parameters. See examples 3 and 4 for usage.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Comments The Update-GPScaleGroup cmdlet accepts the Id of a scale group and the values of
any properties to change. If the parameter for a property is not provided, then the
property will not be changed.

Examples Example 1 changes the description of the scale group with an Id of 5.

Update-GPScaleGroup -ScaleGroupId 5 -Description "Updated description for


Scale Group 5"

Example 2 inactivates the scale group with an Id of 5.

Update-GPScaleGroup -ScaleGroupId 5 –SetInactive

Example 3 sets the status of all scale groups to active.

Get-GPScaleGroup | Update-GPScaleGroup -SetActive

Example 4 sets the status of all scale groups with Id greater than 0 to active. All scale
groups except the the default scale group will be active.

Get-GPScaleGroup | Where-Object {$_.Id -gt 0} | Update-GPScaleGroup


-SetActive

P O W E R S H E L L U S E R S G U I D E 21
U P D A T E -G PS C A L E G R O U P T E N A N T

Update-GPScaleGroupTenant
Description Updates properties for a tenant to scale group assignment.

Syntax Update-GPScaleGroupTenant [-TenantName] <String>


[-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Update-GPScaleGroupTenant [-Assignments] <ScaleGroupTenantAssignment[]>


[-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -TenantName <String>


The name of the tenant for which to update the scale group assignment.

• -SetActive [<SwitchParameter>]
If present, sets the scale group assignment to active.

• -SetInactive [<SwitchParameter>]
If present, sets the scale group assignment to inactive.

• -Assignments <ScaleGroupTenantAssignment[]>
A list of tenant to scale group assignments to update. See example 2 for usage.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Comments The Update-GPScaleGroupTenant cmdlet accepts the tenant name and a switch
parameter to set the scale group assignment to either active or inactive.

Examples Example 1 sets the scale group assignment for Tenant1 to inactive.

Update-GPScaleGroupTenant -TenantName "Tenant1" -SetInactive

Example 2 gets all of the tenants assigned to the scale group with Id 1 and sets them
to inactive.

Get-GPScaleGroupTenant -ScaleGroupId 1 | Update-GPScaleGroupTenant


–SetInactive

22 P O W E R S H E L L U S E R S G U I D E
U P D A T E - G P S E S S I O N H O S T

Update-GPSessionHost
Description Updates properties for an existing session host.

Syntax Update-GPSessionHost -SessionHostId <String> [-Description <String>]


[-ScaleGroupId <Int32>] [-UtilizationRate <Single>]
[-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Update-GPSessionHost [-SessionHosts] <SessionHost[]>


[-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -SessionHostId <String>


The Id of the session host to update.

• -Description <String>
The new value for the description of the session host.

• -ScaleGroupId <Int32>
The new scale group Id to make the session host a member of.

• -UtilizationRate <Single>
The utilization rate of the session host. Accepted values are 1 to 100 for the
percentage of utilization.

• -SetActive [<SwitchParameter>]
If present, sets the session host to active.

• -SetInactive [<SwitchParameter>]
If present, sets the session host to inactive.

• -SessionHosts <SessionHost[]>
A list of session hosts to update. See example 3 for usage.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Comments The Update-GPSessionHost cmdlet accepts the Id of a session host and the values of
any properties to change. If the parameter for a property is not provided, then the
property will not be changed.

Examples Example 1 changes the description of the session host with an Id of SessionHost1.

Update-GPSessionHost -SessionHostId "SessionHost1" -Description


"Updated description for Session Host 1"

Example 2 inactivates and changes the utilization rate of the session host with an Id
of SessionHost1.

Update-GPSessionHost -SessionHostId "SessionHost1" –SetInactive


-UtilizationRate 50

P O W E R S H E L L U S E R S G U I D E 23
U P D A T E -G PS E S S I O N H O S T

Example 3 activates all of the session hosts that are part of the default scale group.

Get-GPSessionHost -ScaleGroupName "Default Group" | Update-GPSessionHost


–SetActive

24 P O W E R S H E L L U S E R S G U I D E
U P D A T E - G P S E S S I O N H O S T T E N A N T

Update-GPSessionHostTenant
Description Set the session host to active or inactive for a tenant.

Syntax Update-GPSessionHostTenant [-TenantName] <String> [-SessionHostId]


<String> [-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Update-GPSessionHostTenant [-Assignments] <SessionHostTenantAssignment[]>


[-SetActive [<SwitchParameter>]] [-SetInactive [<SwitchParameter>]]
[<CommonParameters>]

Parameters • -TenantName <String>


Specifies the name of the tenant to be updated.

• -SessionHostId <String>
Specifies the Id of the session host to be updated.

• -SetActive [<SwitchParameter>]
If present, sets the session host to active for the tenant.

• -SetInactive [<SwitchParameter>]
If present, sets the session host to inactive for the tenant.

• -Assignments <SessionHostTenantAssignment[]>
Specifies a tenant to session hosts object to update.

• <CommonParameter>
This cmdlet supports the common parameters: Verbos, Debug, ErrorAction,
ErrorVariable, WarningAction, WarningVariable, OutButter and OutVariable. For
more information, see about_CommonParameters (http://go.microsoft.com/
fwlink/?LinkID=113216)

Comments The Update-GPSessionHostTenant cmdlet accepts the Id of a session host, a


tenant, and whether the session host should be active or inactive for the tenant.

Examples Example 1 sets SessionHost1 inactive for Tenant1.

Update-GPSessionHostTenant -SessionHostId "SessionHost1" -TenantName


"Tenant1" -SetInactive

Example 2 sets SessionHost1 to active for Tenant1.

Update-GPSessionHostTenant -SessionHostId "SessionHost1" -TenantName


"Tenant1" -SetActive

Example 3 sets all of the tenants assigned to SessionHost1 to active.

Get-GPSessionHostTenant -SessionHostId "SessionHost1" |


Update-GPSessionHostTenant -SetActive

P O W E R S H E L L U S E R S G U I D E 25
26 P O W E R S H E L L U S E R S G U I D E
Index
C
conventions in documentation 1

D
documentation, symbols and conventions
1

G
GP PowerShell
getting help 5
installing 3
list of commands 5
prerequisites 3
starting 5

H
help, for GP PowerShell cmdlets 5

I
installing, GP PowerShell 3

L
light bulb symbol 1

M
margin notes 1

P
PowerShell 3.0 requirement 3
prerequisites, for GP PowerShell 3
product support for GP PowerShell 1

S
support available for GP PowerShell 1
symbols in documentation 1

T
technical support for GP PowerShell 1

W
warning symbol 1

P O W E R S H E L L U S E R S G U I D E 27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy