问题标签 [powershell]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
7 回答
122103 浏览

sql-server - 如何从 PowerShell 调用 SQL Server 存储过程?

我有一个大的 CSV 文件,我想为每一行执行一个存储过程。

从 PowerShell 执行存储过程的最佳方法是什么?

0 投票
5 回答
34803 浏览

windows - 如何获取 LAN 上的活动 IP 地址、MAC 地址和 NetBIOS 名称的列表?

如何获取 LAN 上的活动 IP 地址、MAC 地址和NetBIOS名称的列表?

我想为 LAN 上的每台主机获取 NetBIOS 名称、IP 和MAC 地址,最好不必走到每台 PC 并自己记下这些东西。

如何使用Windows Script Host /PowerShell/whatever 做到这一点?

0 投票
4 回答
158 浏览

.net - .NET Framework 快速构建目录的方法

有没有像 Powershell 中的 Join-Path 函数那样快速加入路径的方法?例如,我有一个路径“C:\foo”和一个子目录“bar”的两个部分。Join-Path 将加入这些并处理反斜杠分隔符。.NET 中是否有内置方法,还是我需要自己处理?

0 投票
13 回答
23491 浏览

vim - 带有 Powershell 的 Vim

我在 Windows 上使用 gvim。

在我的 _vimrc 中,我添加了:

如果我执行此函数 (:Test),我会看到无意义的字符(非数字/字母 ASCII 字符)。

如果我使用 cmd 作为 shell,它可以工作(没有 -name),所以问题似乎是从 powershell 获取输出到 vim。

有趣的是,这很好用:

就像这样:

更新: 确认大卫提到的行为

如果在 _vimrc 中执行上面提到的 set 命令,:Test 会输出废话。但是,如果您直接在 vim 中而不是在 _vimrc 中执行它们, :Test 将按预期工作。

另外,我尝试使用 iconv 以防它是编码问题:

但这没有任何区别。不过,我可能使用了错误的编码类型。

任何人都知道如何使这项工作?

0 投票
2 回答
1188 浏览

powershell - 使用 Powershell 递归文件系统

任何人碰巧有一个示例脚本,用于使用 Powershell 在文件系统中递归给定目录?最终我想要做的是创建一个脚本,它会在给定目录的情况下为我生成 NSIS 文件列表。与这里使用 BASH 脚本所做的非常相似。

0 投票
12 回答
373476 浏览

windows - 如何使用 PowerShell 卸载应用程序?

有没有一种简单的方法可以使用 PowerShell连接到标准的“添加或删除程序”功能来卸载现有的应用程序?或者检查应用程序是否已安装?

0 投票
3 回答
1454 浏览

configuration - Installing PowerShell on 600 client computers - Recommended settings

I want to install PowerShell to 600 Window XP computers, and use it as the main processing shell. For example, for replacing batch scripts, VB scripts, and some other little programs. The installation process is not a problem. Some issues I think I'm going to come across are:

  1. Changing permissions to allow PowerShell to run scripts

  2. The speed of PowerShell starting

  3. Using PowerShell for logon/logoff scripts with GPO

Problem 2: There is a script that is supposed to speed up PowerShell, but it seems to need to be run as administrator (which of course isn't something that normal users do). Has anyone had any experience with using PowerShell in this way?

0 投票
2 回答
3932 浏览

powershell - 如何使用 PowerShell 停止和启动群集的“通用服务”?

如何使用 PowerShell 停止和启动 Microsoft“集群管理员”软件中的“通用服务”?

0 投票
7 回答
9896 浏览

powershell - Is PowerShell a strongly-typed language?

PowerShell is definitely in the category of dynamic languages, but would it be considered strongly typed?

0 投票
1 回答
3191 浏览

iis - 使用 Powershell 访问 IIS 日志?

我知道您可以使用 PowerShell 将注册表之类的东西变成驱动器号。PowerShell 中还有其他对象以这种方式对待其他对象。有谁知道以这种方式访问​​ IIS 日志的任何 cmdlet?