我是 PC 上的本地管理员,但无法查看我的 DNS 后缀。

我只是希望能够查看它们。有没有其他方式可以看到它们?我使用的是 Windows 7 64 位企业版。
有时我运行 grep(又名选择字符串),它的字符串经常出现,然后 PowerShell 会发疯,有时我设法用 Ctrl+C 杀死它,但即便如此,我也不得不忍受 30 秒以上的刺激性哔哔声。 . 是否可以在不杀死正在运行的终端的情况下禁用它?
当我执行 aShift+left-click并选择open command window here
我更改了 %ComSpec% 系统变量,甚至添加到指向 PS 路径的用户变量中时,我试图让 PS 而不是 cmd.exe 打开,但没有结果,cmd.exe仍在开放中。
我一定是做错了什么,有人可以帮我吗?
我正在尝试使用 PowerShell 脚本检查远程服务器上是否存在 IIS 应用程序池。我正在运行的命令是:
test-path "IIS:\AppPools\DefaultAppPool"
Run Code Online (Sandbox Code Playgroud)
如果我直接在有问题的 IIS 服务器上运行此脚本,我会收到“True”的响应,因此这告诉我我在 PowerShell 中正确配置了 IIS 管理。但是,当我从远程服务器运行以下脚本时,我收到“False”响应
invoke-command -ComputerName IISSERVER -ScriptBlock { test-path "IIS:\AppPools\DefaultAppPool" }
Run Code Online (Sandbox Code Playgroud)
我知道 PowerShell 远程处理已正确配置,因为我可以运行以下命令并获取文件列表
invoke-command -ComputerName IISSERVER -ScriptBlock { get-childitems "c:\" }
Run Code Online (Sandbox Code Playgroud)
那么为什么我会得到关于应用程序池存在的错误响应呢?
我目前正在尝试为 Windows Server 2012 构建一个关闭脚本,该脚本将在主服务器关闭时执行到我的副本服务器的计划故障转移。
我的问题是关闭脚本在 Hyper-V 服务停止后执行。
有没有可能让它之前被执行?
在 Windows PowerShell 中:
>ssh -i \Path\To\key.pem user@server.com像冠军一样工作。
>Set-alias sshalias "ssh -i \Path\To\key.pem user@server.com"保存别名时没有错误。
>sshalias 返回以下错误:
sshalias : The module 'ssh -i ' could not be loaded. For more information, run 'Import-Module ssh -i '.
At line:1 char:1
+ sshalias
+ CategoryInfo : ObjectNotFound: (ssh -i \Path\To\Key.pem user@server.com:String) [], CommandNotFoundException
`+ FullyQualifiedErrorId : CouldNotAutoLoadModule`
Run Code Online (Sandbox Code Playgroud)
我缺少什么?
当我尝试删除它时,系统会报错。我当然知道该命令Stop-Process可以帮助我终止该进程。但我不知道哪些进程正在使用它。谁能告诉我如何找到正在使用指定文件的进程?
PS:这是我的powershell版本:

这种情况经常发生,涉及尝试运行“rm -r”等命令或类似的命令,并且您意识到您没有在该 PowerShell 窗口上提升到管理员权限。
通常,您必须打开开始菜单,选择 PowerShell 图标,然后右键单击它以选择“以管理员身份运行”。
我如何避免所有这些步骤?
我正在尝试使用 powershell ps 查找进程执行信息。有一个属性“SI”,其值通常类似于 0、2、10 等。具体来说,我在 powershell 中输入以下内容:
PS C:\Users\> ps -pid 10860
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
175 12 23068 12276 0.20 10860 2 geckodriver
Run Code Online (Sandbox Code Playgroud)
谢谢!没有代码。
我找不到此 SI 属性的文档。有人可以帮忙吗?谢谢
如果我打开新的 Windows 终端,我就可以打开 CMD、Powershell、Wsl 等选项卡。
但是,如果我直接运行 Powershell.exe 或 CMD.exe 或打开 .ps1/.bat 脚本,它们将使用各自的(丑陋的)标准窗口显示,而不是在 Windows 终端内。
我想知道是否有办法使然后始终在 Windows 终端中打开,无论我如何启动它们。
powershell cmd.exe windows-10 windows-subsystem-for-linux windows-terminal
powershell ×10
command-line ×3
windows-10 ×3
alias ×1
cmd.exe ×1
dns ×1
hyper-v ×1
iis ×1
ms-dos ×1
ps ×1
shutdown ×1
ssh ×1
uac ×1
windows ×1
windows-7 ×1
windows-8 ×1