To automate some tasks with PowerShell on a website you sometimes need to log in. Today I tried some curl and postman tricks but it isnβt hard if you know what to script with PowerShell and bypass all other tools.
First, find a website to log in to, then check the page source and what the submit button does. In this example, it is βInloggenβ (dutch for login).
Then start the developer tools (F12), select the network tab, enter the credentials and login.
Now check the POST request in the developer tools.
My use case for a customer was to configure WSUS for a couple of DMZ servers. The DMZ servers are not domain-joined. So I create a PowerShell script to configure the registry so I can easily deploy the settings to the servers.
You can use this script also for non domain-joined servers
With Powershell ISE you can use CTRL + SPACE for auto completion.
Powershell ISE Completion
But when you work in a native Powershell window you don’t have this option. And many often you cycle with tab completion trough the powershell and because you press the TAB button too soon you have to remove characters and cycle again trough all the commands.
Unit now π
There is an easy fix you can implement so the Powershell have the same auto completion like bash.
Type notepad $profile for Windows or gedit $profile for Linux
Add the line Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Add line in $profile
Save the file and restart Powershell
And now you have a much better working tab completion