设计和开发PowerShell脚本,该脚本使用每次创建/删除的临时用户配置文件启动用户定义的流程 [英] Design and develop a PowerShell script that launches a user-defined process using a temporary user profile created/removed every time
问题描述
设计和开发PowerShell脚本,使用每次启动时创建/删除的临时用户配置文件启动用户定义的流程。
必需的输出格式:
ProcessPath ProcessUserName
示例输出:
c:\windows \\\
otepad.exe TestUser
c:\ windows \ system32 \ cmd.exe AnotherUser
c:\windows \ system32 \ mspaint.exe YetAnotherUser
请帮帮我......请拜托。
我对power shell不太了解。
c#和powershell都需要。
Design and develop a PowerShell script that launches a user-defined process using a temporary user profile created/removed every time its launch.
Required output format:
ProcessPath ProcessUserName
Example output:
c:\windows\notepad.exe TestUser
c:\windows\system32\cmd.exe AnotherUser
c:\windows\system32\mspaint.exe YetAnotherUser
Please help me out .... Please please please.
I have no much idea about power shell.
Required both in c# and powershell.
推荐答案
如果你不知道如何做到这一点你有以下选择:
- 放弃这门课程,选择你感兴趣的课程in。
- 告诉你的老师你不明白作业的先决条件,需要额外的辅导。
- 支付别人为你做的工作,并使课程失败。
- 努力学习Powershell和/或C#,并用自己的努力来实现人生目标。
If you have no idea how to do this then you have the following choices:
- Give up on this course, and choose one that you are interested in.
- Tell your teacher that you do not understand the assignment prerequisites and need extra coaching.
- Pay someone else to do your work for you, and fail the course.
- Make an effort to learn Powershell and/or C# and use your own efforts to succeed in your life goals.
为Power Shell找到了这个解决方案:
Switch(
Found this Solution for Power Shell:
Switch (
env:username){
'User1'{notepad; break}
'User2'{calc;休息}
默认{}
}
任何人都可以帮助我在C#。
env:username) {
'User1' { notepad ; break}
'User2' { calc ; break}
Default {}
}
can anyone help me in C#.
这篇关于设计和开发PowerShell脚本,该脚本使用每次创建/删除的临时用户配置文件启动用户定义的流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!