< Back

Test-CrmViewPerformance

Sat Jan 18, 2020 4:07 pm

NAME Test-CrmViewPerformance



SYNOPSIS

Test CRM View performance.





SYNTAX

Test-CrmViewPerformance [-conn <CrmServiceClient>] [-View] <PSObject> [-RunAsViewOwner <SwitchParameter>] [-RunAs

<Guid>] [-IsUserView <SwitchParameter>] [<CommonParameters>]



Test-CrmViewPerformance [-conn <CrmServiceClient>] [-ViewId] <Guid> [-RunAsViewOwner <SwitchParameter>] [-RunAs

<Guid>] [-IsUserView <SwitchParameter>] [<CommonParameters>]



Test-CrmViewPerformance [-conn <CrmServiceClient>] [-ViewName] <String> [-RunAsViewOwner <SwitchParameter>]

[-RunAs <Guid>] [-IsUserView <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Test-CrmViewPerformance cmdlet lets you test CRM View performance.





PARAMETERS

-conn <CrmServiceClient>

A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-View <PSObject>

A view record object to test performance.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RunAsViewOwner [<SwitchParameter>]

Indicate if using view owner's id to run the view to test performance.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RunAs <Guid>

Specify User Id to run the view to test performance.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IsUserView [<SwitchParameter>]

Indicate if the view is user owned view.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ViewId <Guid>

A view id to test performance.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ViewName <String>

A view name to test performance.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts"



This example test "Active Accounts" system view performance by using user of the connection.







ViewName : Active Accounts

FetchXml : <fetch version="1.0" output-format="xml-platform" mapping="logical"><entity

name="account"><attribute name="name" /><attribute

name="address1_city" /><order attribute="name" descending="false" /><attribute

name="primarycontactid" /><attribute name="telephone1"

/><filter type="and"><condition attribute="statecode" operator="eq" value="0"

/></filter><link-entity

alias="accountprimarycontactidcontactcontactid" name="contact" from="contactid"

to="primarycontactid" link-type="outer"

visible="false"><attribute name="emailaddress1" /></link-entity><attribute name="accountid"

/></entity></fetch>

Entity : Account

Columns : 5

LayoutXml : <grid name="resultset" object="1" jump="name" select="1" icon="1" preview="1"><row name="result"

id="accountid"><cell name="name" width="300"

/><cell name="telephone1" width="100" /><cell name="address1_city" width="100" /><cell

name="primarycontactid" width="150" /><cell

name="accountprimarycontactidcontactcontactid.emailaddress1" width="150" disableSorting="1"

/></row></grid>

TotalRecords : 11

Owner : System

Performance : The operation took 00:00:00.3948901



-------------------------- Example 2 --------------------------



Test-CrmViewPerformance -conn $conn -ViewId 00000000-0000-0000-00aa-000010001002



This example test view which has id of 00000000-0000-0000-00aa-000010001002 performance by using user of the

connection.







-------------------------- Example 3 --------------------------



Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts"



This example test "Active Accounts" system view performance by using user of the connection.







-------------------------- Example 4 --------------------------



Test-CrmViewPerformance -conn $conn -ViewName "Active Accounts" -RunAs f9d40920-7a43-4f51-9749-0549c4caf67d



This example test "Active Accounts" system view performance by using specified user.







-------------------------- Example 5 --------------------------



Test-CrmViewPerformance -conn $conn -ViewName "My Custom View" -RunAsViewOwner -IsUserView



This example test "My Custom View" user view performance by using view owner.









RELATED LINKS