Vandrey Trindade replied to the topic Start-Process passing credentials variable (Solved) in the forum General PowerShell Q&A 2 weeks, 3 days ago
I removed the “Start-Process” from the equation and it’s working as expected. Thanks for clarifying it to me!
Vandrey Trindade replied to the topic Start-Process passing credentials variable in the forum General PowerShell Q&A 2 weeks, 4 days ago
Thanks for the fast reply. As soon as I sent the message I was wondering why I’m using start-process… I’ll try again tomorrow. Really appreciate your help! 😊
Vandrey Trindade started the topic Start-Process passing credentials variable (Solved) in the forum General PowerShell Q&A 2 weeks, 4 days ago
I’m trying to use the cmdlet Start-Process using the ArgumentList to make a variable of the current session available on the new process.
I have tried using like this:
$ADCred = Get-Credential
$Path = “.ManageRemoteComputers.ps1”
Start-Process PowerShell -Credential $ADcred -ArgumentList “-File $Path”, $ADCred
And inside the…[Read more]
HARIATTA HESTER and Vandrey Trindade are now friends 2 weeks, 4 days ago
Vandrey Trindade recommended the post ICYMI: PowerShell Week of 24-August-18 1 month, 2 weeks ago
Vandrey Trindade replied to the topic Is there a command to stop the running script? in the forum General PowerShell Q&A 2 months ago
Hmmm… Since it’s not possible, that’s ok then…
I have seen this solution elsewhere:
# Test to see if escape was pressed within the loop
} while ( -not ( $Host.UI.RawUI.KeyAvailable -and ($Host.UI.RawUI.ReadKey(“IncludeKeyUp,NoEcho”).VirtualKeyCode -eq 2
7 ) ) ) Write-Host “ok”
If I press the ESC key, it would stop the code and…[Read more]
Thanks for joining!
I’m not trying to do multiple O365 sessions.
I have created a menu so my colleagues can execute some O365 tasks that they aren’t aware how to do it. In that menu they have a lot of options to choose from.
But the problem is, when they start a script, they have to wait until it is finished. If they enter the wrong…[Read more]
Thanks for replying again!
I’m using that approach on the Active Directory menu, when I have cmdlets that need credentials:
Start-Process PowerShell -Credential $ADcred -ArgumentList “-File .DHCP.3-Reservations.ps1”
But the problem is with the Office 365 menu, where I have a session established and I couldn’t find a way to start…[Read more]
I’m sending a new message on this post again…
I have found this code to block the use of CTRL+C on the console session:
[console]::TreatControlCAsInput = $true
Now I’m trying to find a way to create a shortcut for the “break” command.
Have tried using Set-PSReadlineKeyHandler from the PSReadline module, but on version 1.2 it has some…[Read more]