/// <summary>
        /// Get all Networks
        /// </summary>
        private void GetAllNetworks()
        {
            NetworksListResponse networkListResponse =
                RecoveryServicesClient.GetAzureSiteRecoveryNetworks();

            this.WriteNetworks(networkListResponse.NetworksList);
        }
        /// <summary>
        /// Queries all Networks under Server
        /// </summary>
        private void GetByServer()
        {
            NetworksListResponse networkListResponse =
                RecoveryServicesClient.GetAzureSiteRecoveryNetworks(
                    Utilities.GetValueFromArmId(this.Server.ID, ARMResourceTypeConstants.ReplicationFabrics));

            this.WriteNetworks(networkListResponse.NetworksList);
        }
        /// <summary>
        /// Queries all Networks under Fabric
        /// </summary>
        private void GetByFabric()
        {
            NetworksListResponse networkListResponse =
                RecoveryServicesClient.GetAzureSiteRecoveryNetworks(
                    this.Fabric.Name);

            this.WriteNetworks(networkListResponse.NetworksList);
        }
        /// <summary>
        /// Queries a particular Network
        /// </summary>
        private void GetByFriendlyName()
        {
            NetworksListResponse networkListResponse =
                RecoveryServicesClient.GetAzureSiteRecoveryNetworks(
                    Utilities.GetValueFromArmId(this.Server.ID, ARMResourceTypeConstants.ReplicationFabrics));

            foreach (Network network in networkListResponse.NetworksList)
            {
                if (0 == string.Compare(this.FriendlyName, network.Properties.FriendlyName, true))
                {
                    WriteNetwork(network);
                }
            }
        }
        /// <summary>
        /// Queries a particular Network
        /// </summary>
        private void GetByFriendlyName()
        {
            NetworksListResponse networkListResponse =
                RecoveryServicesClient.GetAzureSiteRecoveryNetworks(
                    this.Fabric.Name);

            foreach (Network network in networkListResponse.NetworksList)
            {
                if (0 == string.Compare(this.FriendlyName, network.Properties.FriendlyName, true))
                {
                    WriteNetwork(network);
                }
            }
        }
        /// <summary>
        /// ProcessRecord of the command.
        /// </summary>
        public override void ExecuteCmdlet()
        {
            try
            {
                NetworkListResponse networkListResponse =
                    RecoveryServicesClient.GetAzureSiteRecoveryNetworks(this.Server.ID);

                this.WriteNetworks(networkListResponse.Networks);
            }
            catch (Exception exception)
            {
                this.HandleException(exception);
            }
        }
        /// <summary>
        /// ProcessRecord of the command.
        /// </summary>
        public override void ExecuteCmdlet()
        {
            try
            {
                this.WriteWarningWithTimestamp(
                    string.Format(
                        Properties.Resources.CmdletWillBeDeprecatedSoon,
                        this.MyInvocation.MyCommand.Name));

                NetworkListResponse networkListResponse =
                    RecoveryServicesClient.GetAzureSiteRecoveryNetworks(this.Server.ID);

                this.WriteNetworks(networkListResponse.Networks);
            }
            catch (Exception exception)
            {
                this.HandleException(exception);
            }
        }