powershell - Azure VM/应用服务的空闲时间 – PowerShell

标签 powershell azure

我们希望确定虚拟机/应用程序服务的空闲时间,以便我们可以将其关闭。 PowerShell 是否允许识别 Azure 环境中虚拟机/应用程序服务的空闲时间值?提前致谢

最佳答案

默认空闲超时为 4 分钟。您可以使用 Powershell 将其手动设置为 4-30 分钟之间的值。示例如下。

设置服务的空闲超时: 设置-AzureLoadBalancedEndpoint -ServiceName“服务”-LBSetName“lbset”-协议(protocol) tcp -LocalPort 80 -ProbeProtocolTCP -ProbePort 8080 -IdleTimeoutInMinutes 30

为虚拟机上的端点设置空闲超时: Get-AzureVM -ServiceName“服务”-名称“VMname”|添加-AzureEndpoint -名称“HttpIn”-协议(protocol)“tcp”-PublicPort 80 -LocalPort 8080 -IdleTimeoutInMinutes 30|更新-AzureVM

获取空闲超时配置: Get-AzureVM –ServiceName“服务” –名称“VMname”|获取 AzureEndpoint

关于powershell - Azure VM/应用服务的空闲时间 – PowerShell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35688360/

相关文章:

powershell - 在PowerShell控制台中使用ANSI/VT100代码输出彩色文本

azure - 定义非常简单的手动 Azure 函数的返回

c# - Azure Blob 存储 - 服务器无法对请求进行身份验证

azure - Microsoft Graph Delta 查询如何区分新用户和老用户?

Powershell - 多个参数 - 条件

powershell - 在PowerShell中执行Shell命令时如何引用变量?

powershell - 替换文本文件中的竖线

powershell - 如何确定Microsoft故障转移群集是否具有仲裁(在Powershell中)

azure - 对象/变量内的搜索字符串 - Powershell

azure - 使用 Terraform 获取 Azure Databricks URL