Answer the question
In order to leave comments, you need to log in
How to add username to PS script in scheduler?
This command has been added to the task scheduler:
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadString('https://api&text=Мой_текст')"
$env:username
it directly in the PS console, but in the scheduler - in the text it just comes with the text $env:username .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question