I
I
Ivan2017-10-19 12:19:17
PowerShell
Ivan, 2017-10-19 12:19:17

How to determine the username of the logged in powershell?

You need to insert the address C:\Users\%username%\Appdata\local\temp\1.html into the script. How to determine username. A person launches a script and a report should be generated for him at his pace.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2017-10-19
@Devagleo

$env:UserName

S
strangerror, 2017-10-26
@strangerror

$(Get-WmiObject Win32_ComputerSystem).UserName

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question