Returns one of these ServiceControllerStatus values: Here's a summary of the commands for controlling the emulator from PowerShell: Get-CosmosDbEmulatorStatus Or place the PSModules directory on your PSModulePath and import it as shown in the following command: $env:PSModulePath = " $env:ProgramFiles\Azure Cosmos DB Emulator\PSModules" Run the following cmdlet to use the PowerShell module: Import-Module "$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules\" The emulator comes with a PowerShell module to start, stop, uninstall, and retrieve the status of the service. Manage the emulator with PowerShell cmdlets Set the default consistency level for the account. The generated key can be used with the /Key or /KeyFile options. Generate a new authorization key and save to the specified file. exe /AllowNetworkAccess /Key=D67PoU0bcK/kgPKFHu4W 3SUY9LNcwcFLIUHnwrkA=ĭon't adjust firewall rules when /AllowNetworkAccess option is used. You must also pass /Key= or / KeyFile= to enable network access. exe /DefaultPartitionCount=50Įnables access to the emulator over a network. Specifies the default number of partitions for a partitioned container. For more information, see change the number of containers. Specifies the maximum number of partitioned containers. Specifies that request rate limiting behavior is disabled. Specifies that request rate limiting behavior is enabled. exe /Key:D67PoU0bcK/kgPKFHu4W 3SUY9LNcwcFLIUHnwrkA= Key must be the base-64 encoding of a 64-byte vector. exe /DirectPorts:65600,65700Īuthorization key for the emulator. Specifies the ports to use for direct connectivity. optionally including a comma-separated list of extra DNS names for accessing the emulator over the network. Generate and install a new self-signed TLS/SSL certificate. You should then use the /GenCert option to create and install a new self-signed TLS/SSL certificate. With this option, the emulator instead fails at startup. exe /StopWprTracesīy default the emulator regenerates its self-signed TLS/SSL certificate, if the certificate's SAN doesn't include the emulator host's domain name, local IPv4 address, localhost, and 127.0.0.1. Stop collecting debug trace logs using Windows Performance Recording tool. Start collecting debug trace logs using Windows Performance Recording tool. Stop collecting debug trace logs using LOGMAN. Start collecting debug trace logs using LOGMAN. If you don't specify a path, it defaults to %LOCALAPPDATA%\CosmosDbEmulator. Recursively removes all the files in the specified path. Use the /GenKeyFile option to generate a keyfile. Read authorization key from the specified file. Port number to use for the API for Table Endpoint. Port number to use for the API for Apache Gremlin Endpoint. Specifies the port number to use for the API for Cassandra endpoint. Specifies the port number to use for API for MongoDB. Hence, ComputePort and ComputePort 79 must be open and available. The gateway's HTTP endpoint probe port is calculated as ComputePort 79. Specifies the port number to use for the compute interop gateway service. Specifies the port number to use for the emulator. The default value is %LocalAppdata%\CosmosDBEmulator. Specifies the path in which to store data files. A negative exit code indicates that an error occurred. Each exit code indicates a status: 1 = Starting, 2 = Running, and 3 = Stopped. Starts up the emulator with default settings.ĭisplays the list of supported command-line arguments. To view the list of parameters, type .exe /? at the command prompt. Manage the emulator with command-line syntax .exe You have to run the commands from the installation location. This article describes how to use the command-line and PowerShell commands to start and stop the emulator, configure options, and perform other operations. After installing the emulator, you can control the emulator with command line and PowerShell commands. The Azure Cosmos DB emulator provides a local environment that emulates the Azure Cosmos DB service for local development purposes.
0 Comments
Leave a Reply. |