且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

powershell

    我知道Windows计算机上许多不需要的文件的文件名的共同特征.如何使用单个正则表达式 PowerShell命令从给定的文件夹或文件夹层次结构中删除所有这些文件?I know a common characteristic of the file na......

    我希望在这种情况下使用 PowerShell 去除域.从以下变量中获取domain.com"的最有效方法是什么?I'm looking to strip out the domain in this scenario using PowerShell.......

    每次我打开 Visual Studio Powershell 时,它都会给我一个错误: Every time i open Visual Studio Powershell it just give me an error: 我该如何解决这个问题? How can i fix this? ...

    我有一个powershell脚本,该脚本以HTML格式发送电子邮件,但该图片显示为带有红色X的空白方块.我似乎无法弄清楚为什么这样做是因为我在网上看到的示例正在做我自己的事情(除非我遗漏了一些我认为自己很明显的事情).此外,图片也将附加到电子邮件中,而......

    再次感谢***的共同之处,我将询问方法".reply()".这是我正在尝试的代码:Hi again ***'s comunity, I will ask about method ".reply()". This......

    在其他方面,Powershell 2.0没有有用的cmdlet Invoke-RestMethod。Among other things, Powershell 2.0 doesn't have the useful cmdlet Invoke-Res......

    我有一个逗号分隔的 CSV 文件,我打算在其中将双引号中的逗号替换为空,并将双引号替换为空:I have a comma separated CSV file, where I intend to replace the commas in doubl......

    连接后,我需要从客户端(与服务器相同的域)连接到某些远程服务器,我需要运行批处理文件:I need to connect to some remote servers from a client (same domain as the servers)......

    我希望我的 Windows 在加载后立即连接到 VPN 服务器.如何使用 Powershell 执行此操作? I'd like my Windows to connect to the VPN server as soon as it loads. How can I do it using Powershell? ...

    问题 我试图将 STDERR 输出捕获到日志文件中;然而,我遇到了一些严重不一致的问题,这些问题正在让我的任务变得更加艰难。 首先,我有 ErrorActionPreference $ c $第二,我在我的代码中尝试了两个变体,用于我的代码中显示的代码......

    我正在将数千行批处理代码转换为PowerShell.我正在使用正则表达式来帮助完成此过程.问题是代码的一部分是:I am in the process of converting thousands of lines of batch code int......

    这是我的示例数据:选项failonnomatch on选项批处理选项确认关闭打开 sftp://username:password@host.name.net:22 hostkey="ssh-rsa 102400:00:00:00:00:00:00:0......

    在上一个64位操作系统平台上运行PowerShell脚本,你怎么能确定的脚本的是什么版本的PowerShell(32位或64位)的脚本运行? When running a PowerShell script on a x64-bit OS platfo......

    我需要从C#中执行PowerShell脚本。该脚本需要命令行参数。I need to execute a PowerShell script from within C#. The script needs commandline arguments.......

    我需要从 C# 中执行 PowerShell 脚本.该脚本需要命令行参数.I need to execute a PowerShell script from within C#. The script needs commandline argume......

    我有两种不同的JSON,如果仅在Address(它是一个数组)下存在,我想从JSON对象中删除街道.我正在尝试在Powershell中执行此操作.我可以使脚本正常工作并删除街道,但是如果地址具有streets属性,我只想运行命令的排除行.I have ......

    我已经格式化了来自其他来源的文本文件;我无法控制这些来源或要求他们生成更适合我的用途的格式,例如 CSV.我可以查看文件的标题行以确定列宽(和名称,但它们在这里不是问题).完成后,我将拥有一系列宽度.我希望能够根据我从标题中确定的宽度分割该文件中的后续......

    我捕获了两个使用以下正则表达式代码匹配的组:I capture two groups matched using the regexp code below:[regex]$regex = "^([0-9]{1,20})(b|kb|mb|gb|tb)$......

    我有一个简单的文本文件,我需要一个 powershell 脚本来替换文件内容的某些部分.I have a simple textfile and I need a powershell script to replace some parts of t......

    运行PowerShell脚本时出现错误:I'm getting an error when I run a PowerShell script: 无法加载文件test_new.ps1。文件test_new.ps1没有经过数字签名。 File test......