6. Get the Identity of the Work Management Service Application Proxy
Scenario/Problem: You need to find the identity of the Metadata Service Proxy.
Solution: Use the Get-SPServiceApplicationProxy
cmdlet.
To get a specific instance of a Work
Management Service Application Proxy, you need the identity of the
Service Application Proxy. No specific cmdlet exists to get the proxy
of a Work Management Service application, so you need to use the Get-SPServiceApplicationProxy
cmdlet to display all service application proxies and find the Work Management Service. Listing 6 shows the command line without any parameters.
Listing 6. Displaying the List of Service Application Proxies
Get-SPServiceApplicationProxy
Note
Even though the list of proxies looks
identical to the service applications, the GUIDs are different.
7. Get a Specific Work Management Service Application Proxy Instance
Scenario/Problem: You need to obtain a Metadata Service Application Proxy instance reference.
Solution: Use the Get-SPWorkManagementServiceApplicationProxy
cmdlet to assign a variable the results using the -Identity
parameter.
Providing the identity of the proxy with the Get-SPWorkManagementService ApplicationProxy
cmdlet retrieves a specific Work Management Service Application Proxy
instance. Use this to assign the results to an object for use in other
cmdlets, as shown in Listing 7.
Listing 7. Assigning a Variable to a Specific Work Management Service Proxy
$workMgmtProxy = Get-SPServiceApplicationProxy -Identity f1e2d3bb-
904b-470c-8061-d28e6f411fd7
Instead of the GUID, you can use the
display name. The default display name for the Work Management Service
application proxy is Work Management Service
. Because this is a long name, when displaying the service application proxies, the full text is cut off.