-ExecutionPolicy Bypass
以下是错误输出:
out-file : Access to the path 'C:\Windows\system32\1' is denied.
At C:\scripts\xxx.ps1:7 char:4
+ if($day>1){$offset= -2}
+
+ CategoryInfo: OpenError: (:) [Out-File], UnauthorizedAccessException
+ FullyQualifiedErrorId : Fileopenfailure,Microsoft.Powershell.Commands.OutFileCommand
如果需要完整代码,我可以删除auth部分并将其放置。