腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(6781)
视频
沙龙
1
回答
将powershell输出存储在CMD中的变量中
、
、
、
在批处理文件中,如何将powershell命令的输出存储在不起作用的变量中 提供20130623 set yest=powershell
get-date
((
get-date
).add
浏览 3
提问于2013-06-25
得票数 3
回答已采纳
2
回答
PowerShell布尔表达式
、
、
、
、
\Process2Periods.xmla | Select-String ((
Get-Date
) |
Get-Date
-Format "yyyyMM") -quiet -ne True) 在尝试运行时
浏览 6
提问于2015-02-18
得票数 1
回答已采纳
1
回答
为什么在PowerShell中"for($i=1;$i -le 1000000;$i++){}“的执行时间比"for([int]$i=1;$i -le 1000000;$i++){}”快
示例代码:$start =
get-date
$end =
get-date
$start =
get-date
$end =
get-date
($end-$start).TotalMilliseconds
浏览 2
提问于2012-11-01
得票数 7
回答已采纳
2
回答
Windows PowershellV4.0确认当前小时为08,但$hour >1评估为"False“
、
、
$hour =
get-date
-UFormat %H If ( ($hour -eq 7 -and $min -gt 45) -or ($hour
浏览 52
提问于2019-03-08
得票数 1
回答已采纳
1
回答
错误:“字符串未被识别为有效的DateTime。”
我在使用
Get-Date
命令时遇到了一些问题,并且我得到了错误:
Get-Date
: Cannot bind parameter 'Date'.Scheduled Start Date' = $CEST + [Math]::Floor([decimal](
Get-Date
(
Get-Date
$_.'Scheduled End Date' = $CEST + [Math]::Floor([decimal](
Get-Date
(
Get-Date</e
浏览 21
提问于2020-05-06
得票数 0
回答已采纳
1
回答
在PowerShell中使用UniversalTime处理划时代时间
、
、
我知道我能做的是:Wednesday, November 15, 2017 5:07:35 PM和:1510747694.20287 但是,我如何将它们结合起来,以便从UTC的时代开始就能得到秒呢?
浏览 1
提问于2017-11-15
得票数 4
回答已采纳
1
回答
从powershell命令输出中获取前一天的日期作为批处理文件中的变量
、
、
、
、
ECHO STARTING FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -Command "& {if ^(^([Int] ^(
Get-Date
^).DayOfWeek^) -eq 1^) {
get-date
^(^(
get-date
^).addDays^(-2^)^) -uformat "%%d.%%Y"} Else{
get-date
^(^(
get-date
^).addDays^(-1^)
浏览 0
提问于2020-05-05
得票数 0
4
回答
在PowerShell中查找当前季度以附加一个格式为"yyyyqq“的文件名
我已经得到了当前月份和星期,如下所示:$yesterdayMMDDYY=(
get-date
(
get-date
).AddDays(-1) -uformat %m%d%Y) $monthly=(
get-date
(
get-date
).AddDays(-1) -uformat
浏览 4
提问于2013-07-18
得票数 1
回答已采纳
1
回答
Get-Date
-Format对
Get-Date
给出了不同的结果
QDate = $(
Get-Date
-Format "yyyyMMdd hh:MM:ss tt") 如果我简单地输入
Get-Date
,我可以获得服务器的本地时间,但是我使用这个变量在SQL Database>
Get-Date
-Format "yyyyMMdd hh:MM:ss tt" April 25, 2019 10:07:28 AM 时差
浏览 13
提问于2019-04-25
得票数 0
回答已采纳
1
回答
PowerShell:使用命令输出+字符串作为文件名
、
、
、
、
我试过这个例子,但不起作用: PS C:\>streamlink --hls-live-restart -o (
Get-Date
-Date ((
Get-Date
).DateTime) -UFormat
浏览 20
提问于2020-04-20
得票数 1
1
回答
Get-WinEvent开始和结束日期不过滤记录
、
、
[]]$EventLogNames=@("Application","System")#Main eventlogs [System.DateTime[]]$EventEndTime = (
Get-Date
) $EventCritea =
浏览 6
提问于2012-05-20
得票数 2
回答已采纳
6
回答
上周一午夜在Powershell
、
、
$firstDayOfMonth =
Get-Date
((("01/" + (
Get-Date
$today).Month).ToString() + "/" + ((
Get-Date
$today)
浏览 2
提问于2014-02-09
得票数 5
回答已采纳
4
回答
使用Powershell如何获得工作日数字?
(
Get-Date
).DayOfWeek 我想我可以在switch语句中使用上述代码中的日期名称将其转换为数字,但这似乎不是很有说服力。
浏览 5
提问于2013-02-27
得票数 14
回答已采纳
1
回答
PowerShell调用--AzOperationalInsightsQuery需要在100秒或更短的时间内完成
、
$startTime = (
Get-Date
).ToUniversalTime().AddDays(-1).Date # $csvFileName = "$((
Get-Date
).Year)$((
Get-Date
).Month.ToString(
浏览 9
提问于2022-08-31
得票数 0
回答已采纳
2
回答
数组中的PowerShell
Get-Date
、
、
我已经使用
GET-DATE
编写了各种命令来完成此任务,但我不确定如何在PowerShell中使用
GET-DATE
进行循环,并使用所需的格式递增
GET-DATE
。"2015-01-26"((
Get-Date
-Format "M/dd/yyyy") + " " + "1:00 am&
浏览 0
提问于2015-01-28
得票数 0
2
回答
决定季节
、
到目前为止,我的情况如下:$currentDate =
Get-Date
02-22 $season = "Spring" } elseif ($currentDate -ge (
get
浏览 0
提问于2018-06-21
得票数 0
回答已采纳
2
回答
如何从另一个powershell脚本逐字编写/创建powershell脚本?
下面的代码(在底部)在文件中生成以下输出之一4/13/2019 = (
get-date
).AddDays(2 + 1).ToShortDateString(); = (
get-date
).AddDays(2).ToShortDateString(); $s
浏览 0
提问于2019-04-10
得票数 0
2
回答
Powershell HowTo获取2个月前的最后一天
、
、
如果我在一月份,$(
get-date
).month -1结果为0。所以我这样做了: if $datenow.day -eq 14然后我计算 $datenow.AddDays(-$LastDayInMonth
浏览 1
提问于2013-05-01
得票数 5
回答已采纳
2
回答
Powershell使用字符串中的
Get-Date
在txt文件中打印。
但在我的剧本里 "$computer" + "_Already_Had_Software_" + "(
Get-Date
)" | Out-File -FilePath "\\server\Install\
浏览 7
提问于2016-10-03
得票数 1
回答已采纳
1
回答
Powershell中多个cmdlet的协调
、
、
、
我一开始就用:这会产生错误: $strDay =
get-date
-Format "dd"$strDay = $strDay
浏览 1
提问于2014-08-07
得票数 1
回答已采纳
点击加载更多
相关
资讯
Win11记事本时间戳怎么自动插入?详细教程与技巧
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券