Add-PortableType
The Add-PortableType cmdlet enables the user to register different custom classes and data types for data sharing which reduces traffic and data size with the help of Compact Serialization. Data sharing can be configured between different versions of objects of same platform as well as different objects of different platforms using this cmdlet.
Add-PortableType -CacheName -ConfigPath [-Server] [-Port] [-Credentials] [-NoLogo]
Examples
- This command enables cross-platform data sharing by registering the shared types defined in the configuration file for the specified cache.
Add-PortableType -CacheName demoCache -ConfigPath C:\config.xml
- This command configures the shared types object for the cache existing on server 20.200.20.11.
Add-PortableType -CacheName demoCache -ConfigPath C:\config.xml -Server 20.200.20.11
- This command configures the shared types object for the cache existing on server 20.200.20.11 and port 8250.
Add-PortableType -CacheName demoCache -ConfigPath C:\config.xml -Server 20.200.20.11 -Port 8250
- This command configures the shared types object for the cache, using security credentials.
Add-PortableType -CacheName demoCache -ConfigPath C:\config.xml -Credentials(Get-Credential john_smith)
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 for which data sharing is to be enabled. Note: The cache must already exist on the source server. |
- |
-ConfigPath* |
<String> |
Specifies the path of the configuration file where the data types need to be configured. | - |
-Server |
<String> |
Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. | IP of local machine |
-Port |
<Integer> |
Specifies the server port where the NCache Service is listening. | 8250 |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |