powershell - Powershell:-或在while循环中
问题描述
我的格式有什么问题。当只有一个条件时,代码运行。当我添加 -or 和第二个条件来检查时,它似乎也没有检查。
while(($TempLog.id -ne "18") -or ($TempLog.id -ne "32"))
{
$TempLog = Get-WinEvent -computername F9P8NW2-5300 -LogName 'Microsoft-Windows-RemoteAssistance/Operational'-MaxEvents 1
}
在此处输入代码
解决方案
推荐阅读
- ios - 2FA App Store - 应用程序特定密码和 FASTLANE_SESSION 不能多次使用?
- javascript - 将对象解构为数组
- swiftui - 如何在swiftUI中运行两次
- rest - Jenkins 插件有 REST API 吗?
- retrofit2 - Retrofit可以将@Path参数从自定义类转换为原始类型
- mysql - 项目最佳交集的 SQL 查询
- spring-boot - Netflix Feign 自定义错误解码器无法正常工作
- python - 从重度嵌套字典中的一组值创建列表
- python - 如何删除以前见过的 Pandas 行
- php - 需要重新排序 sort_column Yii2