gpt4 book ai didi

memory - Powershell:在运行空间 session 中创建文件

转载 作者:行者123 更新时间:2023-12-03 00:04:02 25 4
gpt4 key购买 nike

今天早上快点。

是否可以创建文件并将Powershell运行空间/ session 内存存储在其中?

就像是:

out-file 'powershell session space'?

代替:
out-file C:\temp\system_info.txt

我正在创建一个电子邮件模板,该模板从运行脚本的计算机上捕获数据并将其发送到域管理员。但是,如果它是由另一位用户运行的,无论出于何种原因,该用户都无法访问“temp”文件夹甚至C:\驱动器,我希望在PS session 的内存中创建文件(script_info.txt)。那可能吗?

谢谢

最佳答案

发现是这样的:

out-file "$env:TEMP\file.extention"

关于memory - Powershell:在运行空间 session 中创建文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12759112/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com