随笔分类 - Powershell
摘要:如何使用PowerShell压缩文件 它使用您要压缩的任何文件的路径(多个文件用逗号分隔),并将它们存档在您指定的目标位置。 Compress-Archive -LiteralPath <PathToFiles> -DestinationPath <PathToDestination> https:
阅读全文
摘要:-and(逻辑与) -or(逻辑或) -xor(逻辑XOR) -not(逻辑非) ! (与逻辑非相同)
阅读全文
摘要:字符串包含的三种方法 Console.WriteLine("请输入第一个字符串"); string str1 = Console.ReadLine(); Console.WriteLine("请输入第二个这了符串"); string str2 = Console.ReadLine(); 第一种Con
阅读全文
摘要:1 $Filter = @{ 2 LogName = 'Application' 3 Id = 62 4 #StartTime = (Get-Date).AddHours(-1) 5 } 6 $rebootEvent = Get-WinEvent -FilterHashtable $Filter -
阅读全文