Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何在Powershell中将字符串转换为UInt64?字符串到数字的转换
考虑以下 Powershell 片段 Uint64 Memory 1GB string MemoryFromString 1GB Uint64 ConvertedMemory Convert ToUInt64 MemoryFromStrin
PowerShell
typeconversion
powershell50
无法找到模块提供者
我在使用 PowerShell 时遇到问题 几乎就像没有完全安装一样 这很奇怪 因为它是 Windows 10 并且是附带的 在没有锁定的情况下 我尝试使用另一台正在运行的 Windows 10 计算机上的全新副本替换以下目录 C User
Windows
PowerShell
powershell50
为什么我不能在类方法中使用预定义变量?
我尝试在类方法中使用预定义变量 例如 PSVersionTable 或 PSScriptRoot 他们失败并显示错误消息 方法中未分配变量 Example Class Foo String Version GetVersion If PSV
PowerShell
powershell50
Start-Job - 实时检索输出
我们通过以下方式启动 Powershell 函数Start Job并希望实时检索调用者的输出 有没有一种好的方法可以在不打电话的情况下做到这一点Retrieve Job在循环中 尝试这样的事情 appJob Start Job foreac
PowerShell
powershell50
PowerShell 5 中的写入主机与写入信息
众所周知 Write Host是邪恶的 在PowerShell 5 Write Information被添加并被考虑替换Write Host 但是 说实话 哪个更好呢 Write Host是邪恶的 因为它不使用管道 因此输入消息无法被重用
PowerShell
powershell50
如果主体参数以“@”开头,则发出 PowerShell POST 请求
我想在 PowerShell 中发出 POST 请求 以下是 Postman 中的正文详细信息 type login username email protected cdn cgi l email protection password
REST
PowerShell
powershell50
如何访问 Import-Csv 数组中的特定行?
我需要将大文件上传拆分为多个并行进程 并希望使用单个 CSV 文件作为输入 是否可以从一个访问行块Import Csv对象 像这样 SODAData Import Csv CSVPath Delimiter Where Rownum 20
csv
PowerShell
powershell50
如何应用多个 DSC 配置?
这是我的例子 Config AllNodes NodeName localhost PSDscAllowPlainTextPassword True Configuration LocalAdmin Param String Node lo
PowerShell
powershell40
powershell50
dsc
以当前登录用户身份运行 powershell 命令
给定一个作为本地系统运行的 powershell 脚本 nt authority system 有没有办法以当前登录的用户身份执行命令 当然不指定用户密码 从我到目前为止的实验来看Register ScheduledTaskcmdlet 需
PowerShell
powershell50
如何强制 powershell 重新加载自定义模块?
我创建了一个模块 ActiveDirectory psm1 其中包含 powershellv5 中的一个类 我将该模块导入另一个名为 test ps1 的文件中 然后从该类中调用一个方法 test ps1 包含以下内容 using modu
PowerShell
powershell50
powershellmodule
如何使用变量名访问对象的属性?
这有效 psISE Options DebugBackgroundColor FFC86400 这不会 attribute DebugBackgroundColor psISE Options attribute FFC86400 错误 无
PowerShell
object
powershell50
`more.com` 返回“内存不足”。
环境详情 x64 Win7 SP1 企业版 Windows PowerShell v5 0 没有加载任何配置文件 我的本地电源外壳 questions tagged powershell会话正在返回 内存不足 当我尝试执行时help or
Windows
PowerShell
CMD
powershell50
Powershell 版本 5 Copy-Item -FromSession 找不到
我正在尝试通过以下方式从远程会话复制一些日志文件 FromSession的参数Copy Itemcmdlet 在呼叫计算机上我安装了 PS 版本 5 运行脚本时我收到以下错误 Copy Item A parameter cannot be
PowerShell
powershell40
powershell50
尝试让 powershell 在 C#/Visual Studio 中工作
我试图学习如何在 C 中使用 powershell 我正在关注本教程 https blogs msdn microsoft com kebab 2014 04 28 executing powershell scripts from c 但
c
VisualStudio2019
powershell50
更改代码后,PowerShell ISE 有时会出现不可预测的行为
我正在使用 PowerShell ISE PS 版本 5 0 如果我运行这段代码 Write Host This 它输出 This 如果我像这样修改脚本 Write Host That 它输出 That 伟大的 正如预期的那样 现在 如果我
PowerShell
powershellise
powershell50
用对象的属性来生成函数
在 PowerShell 中 您可以将多个参数传递给函数或 cmdlet 方法是将它们包装在哈希表变量中 然后传递前缀为该变量 代替 是否可以使用作为另一个对象的属性的哈希表 即作为一个衬垫 进行splat 例如下面我首先必须分配属性 te
PowerShell
powershell50
splat
Import-Module 仅在从 Get-Module 进行管道传输时才有效
I wrote a simple PowerShell module I need to keep more versions of the module All paths to versions are added to env PSM
PowerShell
powershell50
ImportModule
映射的网络驱动器未显示在“我的电脑”中
我正在尝试使用 PowerShell 5 0 创建外部网络驱动器 我需要这些驱动器才能显示在 我的电脑 中 为此 我使用以下命令 New PSDrive Name X PSProvider FileSystem Root 192 168 0
PowerShell
windows7x64
powershell50
在 PowerShell 中获取伟大的祖父文件夹路径(向上三级)?
有没有一种优雅的方法可以从文件夹路径获取 曾祖父母文件夹 三层 我只是想得到C folderA folderB从完整的路径来看 但这两种解决方案对我来说都显得丑陋 path C folderA folderB folderC FolderD
PowerShell
powershell50
PowerShell 5.1 - 如何卸载当前使用的模块
我们在一个部署 PowerShell 脚本中使用一些 PowerShell 模块 使用以下命令 我们将模块 即 XXXX 安装到 C Program Files WindowsPowerShell Modules 中 Install Mod
PowerShell
uninstallation
powershell50
powershellmodule
1
2
»