你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-WAPackStaticIPAddressPool
删除静态 IP 地址池对象。
注意
本文档中引用的 cmdlet 用于管理使用服务管理 API 的旧式 Azure 资源。 若要了解用于管理 Azure 资源管理器资源的 cmdlet,请参阅 Az PowerShell 模块。
语法
Remove-WAPackStaticIPAddressPool
-StaticIPAddressPool <StaticIPAddressPool>
[-PassThru]
[-Force]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
说明
这些主题已弃用,将来将被删除。
本主题介绍 Microsoft Azure PowerShell 模块 0.8.1 版本中的 cmdlet。
若要了解正在使用的模块版本,请从 Azure PowerShell 控制台键入 (Get-Module -Name Azure).Version
。
Remove-WAPackStaticIPAddressPool cmdlet 删除静态 IP 地址池对象。
示例
示例 1:删除静态 IP 地址池
PS C:\> $StaticIPAddressPool = Get-WAPackStaticIPAddressPool -Name "ContosoStaticIPAddressPool01"
PS C:\> Remove-WAPackStaticIPAddressPool -StaticIPAddressPool $StaticIPAddressPool
第一个命令使用 Get-WAPackStaticIPAddressPool cmdlet 获取名为 ContosoStaticIPAddressPool01 的静态 IP 地址池,然后将该对象存储在$StaticIPAddressPool变量中。
第二个命令删除存储在$StaticIPAddressPool中的静态 IP 地址池。 该命令会提示你进行确认。
示例 2:在不确认的情况下删除静态 IP 地址池
PS C:\> $StaticIPAddressPool = Get-WAPackStaticIPAddressPool -Name "ContosoStaticIPAddressPool02"
PS C:\> Remove-WAPackStaticIPAddressPool -StaticIPAddressPool $StaticIPAddressPool -Force
第一个命令使用 Get-WAPackStaticIPAddressPool cmdlet 获取名为 ContosoStaticIPAddressPool02 的静态 IP 地址池,然后将该对象存储在 $ StaticIPAddressPool 变量中。
第二个命令删除存储在$StaticIPAddressPool中的静态 IP 地址池。 此命令包括 Force 参数。 该命令不会提示你进行确认。
参数
-Force
强制运行命令而不要求用户确认。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
返回一个代表你所处理的项目的对象。 默认情况下,此 cmdlet 将不产生任何输出。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StaticIPAddressPool
指定 StaticIPAddressPool。 若要获取静态 IP 地址池,请使用 Get-WAPackStaticIPAddressPool cmdlet。
Type: | StaticIPAddressPool |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |