CmdID

CmdID / PowerShell / Cmdlets / Export

Export-ODataEndpointProxy

Generates a module that contains cmdlets to manage an OData endpoint. PowerShell reference

From the PowerShell reference 15 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Generates a module that contains cmdlets to manage an OData endpoint. The Export-ODataEndpointProxy cmdlet uses the metadata of an OData endpoint to generate a module that contains cmdlets you can use to manage that OData endpoint. The module is based on CDXML. After this cmdlet generates the module, it saves that module to the path and file name specified by the OutputModule parameter. Export-ODataEndpointProxy generates cmdlets for create, read, update, and delete (CRUD) operations, non-CRUD actions, and association manipulation. Export-ODataEndpointProxy generates one CDXML file per endpoint resource. You can edit these CDXML files after the module is generated. For example, if you want to change the noun or verb names of the cmdlets to align with Windows PowerShell cmdlet naming guidelines, you can modify the file. Every cmdlet in a generated module must include a ConnectionURI parameter in order to connect to the endpoint that the module manages.

Export-ODataEndpointProxy [-Uri] <String> [-OutputModule] <String> [[-MetadataUri] <String>] [[-Credential] <PSCredential>] [[-CreateRequestMethod] <String>] [[-UpdateRequestMethod] <String>] [[-CmdletAdapter] <String>] [[-ResourceNameMapping] <Hashtable>] [-Force] [[-CustomData] <Hashtable>] [-AllowClobber] [-AllowUnsecureConnection] [[-Headers] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]

Generate a module to manage a retail web service endpoint

PS C:> Export-ODataEndpointProxy -Uri 'http://services.odata.org/v3/(S(snyobsk1hhutkb2yulwldgf1))/odata/odata.svc' -MetadataUri 'http://services.odata.org/v3/(S(snyobsk1hhutkb2yulwldgf1))/odata/odata.svc/$metadata' -AllowUnsecureConnection -OutputModule 'C:\Users\user\GeneratedScript.psm1' -ResourceNameMapping @{Products = 'Merchandise'}Identify

Its page in the reference: Export-ODataEndpointProxy.

Parameters

15 in the PowerShell reference
-AllowClobberIndicates that this cmdlet replaces an existing module.
-AllowUnsecureConnectionIndicates that this module can connect to URIs that are not SSL-secured. The module can manage HTTP sites in addition to HTTPS sites.
-CmdletAdapterSpecifies the cmdlet adapter. The acceptable values for this parameter are: ODataAdapter and NetworkControllerAdapter.
-CreateRequestMethodSpecifies the request method. The acceptable values for this parameter are: PUT, POST, and PATCH.
-CredentialSpecifies a user account that has access to the OData endpoint. The default value is the current user. If a remote computer runs Windows Vista or a later release of the Windows operating system, the cmdlet prompts you for credentials.
-CustomDataSpecifies a hash table of custom data.
-ForceIndicates that this cmdlet overwrites an existing generated module of the same name in an existing Modules folder.
-HeadersSpecifies the headers of the web request. Enter a hash table or dictionary.
-MetadataUriSpecifies the URI of the metadata of the endpoint.
-OutputModuleSpecifies the path and module name to which this cmdlet saves the generated module of proxy commands. This cmdlet copies a binary module, module manifest, and formatting file, if applicable, to the specified folder. If you specify only the name of the module, Export-ODataEndpointProxy saves the module in the $HOME\Documents\WindowsPowerShell\Modules folder. If you specify a path, the cmdlet creates the module folder in that path.
-ResourceNameMappingSpecifies a hashtable that contains mappings that let you customize the generated cmdlets. In this hashtable, the resource collection name is the key. The desired cmdlet noun is the value. For example, in the hash table @{Products = 'Merchandise'}, Products is the resource collection name that serves as the key. Merchandise is the resulting cmdlet noun. The generated cmdlet names might not align to Windows PowerShell cmdlet naming guidelines. You can modify the resource CDXML file to change the cmdlet names after this cmdlet creates the module. For more information, see Strongly Encouraged Development Guidelines.
-UpdateRequestMethodSpecifies the update request method. The acceptable values for this parameter are: PUT, POST, and PATCH.
-UriSpecifies the URI of the endpoint.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.