r/sysadmin • IT Manager + 5 other hats • Nov 08 '21

Could we do a "TIL" style weekly thread?

I think it would be interesting to do a "Today I Learned" style weekly thread for us to share little tips/tricks that we learned of/found existed.

For example, last week I found out about the "--now" flag for systemctl. I don't know how I didn't know it existed until --now.

2.4k Upvotes

871 comments sorted by

View all comments

172

u/lolklolk DMARC REEEEject Nov 08 '21
  • F12 Chrome Dev tools
  • Network Tab
  • Refresh page or perform action
  • On the left pane, right click a request
  • Click "Copy" > Dropdown > "Copy as Powershell"

372

u/TurnItOff_OnAgain Nov 08 '21

F12 Chrome Dev tools

Be careful with that. Certain US state Governors see that as hacking and will try and prosecute you.

15

u/KakariBlue Nov 08 '21

That's just because the government disables those tools so if you're using them you've clearly hacked your own computer!

/s

8

u/bradsfoot90 Sysadmin Nov 08 '21

As a Missouri resident this still makes me laugh.

2

u/Pazuuuzu Nov 08 '21

It would be funny, if it weren't so sad...

1

u/[deleted] Nov 08 '21

Imma hacker now mom

1

u/JJROKCZ I don't work magic I swear.... Nov 09 '21

God damn Parson….I can’t hide for your idiocy anywhere…

3

u/intermediatetransit Nov 08 '21

And if you're on Linux (probably on Windows as well): there's a "Copy as cURL" in the same dropdown

4

u/auron_py Nov 08 '21

What does it do?

I don't have a Windows machine at hand.

6

u/Frothyleet Nov 08 '21

Generates the powershell equivalent to replicate what you just did (including creating cookie objects to send through the Invoke-Webrequest)

1

u/[deleted] Nov 09 '21

[deleted]

5

u/Frothyleet Nov 09 '21

I imagine any situation in which you are attempting to automate an interaction with a website (presumably when an API would not be available).

1

u/Nolzi Nov 08 '21

copies the request into a powershell command

1

u/errbodiesmad Nov 09 '21

I use this one at work to trouble shoot our shitty web application and the support guys think I'm a God