Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
在 powershell 中打开 Excel 时出错
我需要用以下命令打开 Excel 文件CorruptLoad来自 powershell 脚本的参数 但是当我尝试做到这一点时 出现错误Exception calling Open with 15 argument s open method
Excel
PowerShell
powershell40
在 Powershell 4 中压缩和解压缩文件
我使用的是 Windows Server 2012 R2 64 位 我有 powershell 版本 4 可用 我正在尝试压缩和解压缩文件 当我尝试 Write Zip 命令时 它会抛出以下错误 Write Zip 术语 Write Zip
PowerShell
zip
unzip
powershell40
Powershell SQL Server数据库连接和连接超时问题
我有一个连接到 SQL Server 2012 数据库的 powershell 脚本 该脚本运行 SQL 查询并将结果集放入数据表中 以将格式化的电子邮件发送给相关方 下面是问题所在的代码片段 CBA New Object System D
sqlserver
PowerShell
SQLServer2012
powershell40
在powershell中检查文件是否可读且正常
我是 powershell 新手 我想检查文件是否可读且正常 在 unix 中 我们可以使用 f 和 r 在一行中完成此操作 例如 以下 shell 脚本函数接受文件名作为参数并检查文件的可读性和规律性 与此等效的 powershell 是
shell
PowerShell
powershell30
powershell40
powershell 中的 PsObject 数组
这是我的代码 a for i 0 i lt 5 i item New Object PSObject item Add Member type NoteProperty Name Col1 Value data1 item Add Memb
PowerShell
powershell40
Powershell Invoke-RestMethod 授权标头
当调用一个Invoke RestMethod使用 Powershell 例如 Invoke RestMethod Method Get Uri https google com api GetData Headers headers and
如何让 PowerShell 4 cmdlet(例如 Test-NetConnection)在 Windows 7 上运行?
情况 在 Windows 7 SP1 计算机上 我已更新为 Windows6 1 KB2819745 x64 MultiPkg msu 此外 在 PowerShell 中 PSVersionTable 现在报告 PSVersion 4 0
PowerShell
windows7
powershell40
使用 Windows 窗体在脚本终止后几分钟锁定 PowerShell ISE
我这里有一个有趣的问题 我正在创建一个日历选择器 供我们创建帐户时使用 它工作正常并且仍在进行中 但我注意到当我在 powershell ISE 中运行脚本时 几分钟后它会锁定 我可以在此之前编辑并保存代码几分钟 事件日志中没有任何内容 我
WinForms
PowerShell
powershell40
Powershell v4 不自动导入模块
我在用Microsoft PowerShell v4 PS C gt get host Name ConsoleHost Version 4 0 InstanceId 3b4b6b8d 70ec 46dd 942a bfecf5fb6f31
c
PowerShell
module
load
powershell40
我可以让这个脚本更快吗?
我为实习编写了一个简单的脚本 该脚本会遍历提供的目录并删除任何早于指定天数的文件 我今天花了所有的空闲时间试图加强它 这是我到目前为止所得到的 function delOld dir numDays timespan new timespa
Windows
PowerShell
powershell40
如何应用多个 DSC 配置?
这是我的例子 Config AllNodes NodeName localhost PSDscAllowPlainTextPassword True Configuration LocalAdmin Param String Node lo
PowerShell
powershell40
powershell50
dsc
使用 powershell 刷新 Excel 工作表
我在一个名为 test 的文件夹中有 10 个不同的 Excel 工作表 我想使用 Windows Power shell 脚本刷新数据连接和数据透视表中的数据 该过程使用 for 每个循环打开每个文件 然后在文件中选择 powerpivo
Excel
PowerShell
powershell20
powerpivot
powershell40
使用powershell创建计划任务并且不存储密码
我正在尝试制作一个 powershell 脚本来创建计划任务以按需运行命令 以下是我迄今为止的代码 taskName TestTask taskPath
PowerShell
WindowsServer2012r2
powershell40
使用凭据将文件复制到远程服务器时使用 PowerShell 命令出错
PS C Windows system32 gt Copy Item ToSession s C Programs temp test txt Destination C Programs temp test txt Copy Item 找
PowerShell
powershell40
如何在 PowerShell 中正确/全局地对 UTF-8(无 BOM)文件进行分类? (到另一个文件)
创建文件utf8 txt 确保编码为 UTF 8 无 BOM 将其内容设置为 In cmd exe type utf8 txt gt out txt 内容out txt is 在 PowerShell v4 中 cat utf8 txt g
PowerShell
UTF8
powershell40
byteordermark
powershell 在输出中将换行符放在不适当的位置
我有一个 PowerShell 脚本 但某些输出在继续下一行之前会在任意点被剪切 这非常烦人 例如 我可以使用Write Host只要我想要 该行就会继续 注意 在 Team City 中运行 并且 Team City 添加了一些前缀信息
PowerShell
wordwrap
powershell40
Invoke-RestMethod 错误:无法发送正文类型
我正在尝试使用 Invoke RestMethod 从 Freshdesk 获取门票 我收到的错误是 Invoke RestMethod 无法发送具有此动词类型的内容正文 我的函数如下所示 function opentickets Body
PowerShell
powershell20
powershell30
powershell40
freshdesk
用新行替换字符
Powershell ver 4 Windows 7 我想更换 在文本文件中添加新行 我尝试了下面的脚本 Get Content C Test test txt Replace n Set Content C Test testv2 txt
PowerShell
powershell40
Powershell 版本 5 Copy-Item -FromSession 找不到
我正在尝试通过以下方式从远程会话复制一些日志文件 FromSession的参数Copy Itemcmdlet 在呼叫计算机上我安装了 PS 版本 5 运行脚本时我收到以下错误 Copy Item A parameter cannot be
PowerShell
powershell40
powershell50
PowerShell 中“@{}”的含义是什么
我在这里有一行脚本供审查 我注意到带有值的变量声明 function readConfig Param string fileName config Get Content fileName Where Object like ForEac
PowerShell
powershell40
1
2
3
»