Add-TestData - PowerShell Cmdlet
This PowerShell Cmdlet enables the user to add some test data to the cache to check if the cache has started and is working properly. By default this data expires after the time interval of 300 seconds. The item size can be specified by the user in the PowerShell Cmdlet.
Note
This feature is only available in NCache Enterprise and Professional.
Add-TestData [-CacheName] [-Server] [-ItemCount] [-DataSize] [-AbsoluteExpiration] [-NoLogo] [-Credentials]
Examples of Add-TestData - PowerShell Cmdlet
- This PowerShell Cmdlet adds 10 items to the demoCache with an expiry of 5 minutes. This command reads deployment details specified in client.ncconf.
Add-TestData –CacheName demoCache
- This command adds 100 items to the demoCache with an expiry of 5 minutes. This command reads deployment details specified in client.ncconf.
Add-TestData -CacheName demoCache -ItemCount 100
- This command adds 100 items of size 2KB to the demoCache with an expiry of 5 minutes. This command reads deployment details specified in client.ncconf.
Add-TestData -CacheName demoCache -ItemCount 100 -DataSize 2048
- This command adds 100 items to the demoCache with an expiry of 5 minutes. This command ignores deployment details specified in client.ncconf.
Add-TestData -CacheName demoCache -ItemCount 100 -Server "20.200.20.11,20.200.20.12"
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-CacheName* |
<String> |
Specifies the name of the Cache to which test data will be added. | - |
-Server |
<String> |
Specifies one or more ip-address(es) for one or more cache-server(s). This option can be used to customize the list of ip-address(es) to be displayed. Note: Comma separated ip-addresses are to be specified in case of multiple servers inside double quotes. | - |
-ItemCount |
<Long> |
Specifies the number of test items to be added to the cache. | 10 |
-DataSize |
<Long> |
Specifies the size of each item to be added to the cache. | 1k (1024 bytes) |
-AbsoluteExpiration |
<Double> |
Specifies the time in seconds for the Absolute expiration of the test data items. Its minimum value is 15 seconds. | 300 seconds |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user who has appropriate permissions at the node. | - |