コード例 #1
0
        /// <summary>
        /// ProcessRecord of the command.
        /// </summary>
        public override void ExecuteCmdlet()
        {
            try
            {
                SiteListResponse response = RecoveryServicesClient.GetAzureSiteRecoverySites(this.Vault);

                this.WriteSites(response.Sites);
            }
            catch (Exception exception)
            {
                this.HandleException(exception);
            }
        }
コード例 #2
0
        /// <summary>
        /// ProcessRecord of the command.
        /// </summary>
        public override void ExecuteCmdlet()
        {
            try
            {
                this.WriteWarningWithTimestamp(
                    string.Format(
                        Properties.Resources.CmdletWillBeDeprecatedSoon,
                        this.MyInvocation.MyCommand.Name));

                SiteListResponse response = RecoveryServicesClient.GetAzureSiteRecoverySites(this.Vault);

                this.WriteSites(response.Sites);
            }
            catch (Exception exception)
            {
                this.HandleException(exception);
            }
        }