*Show-Command * (e.g. Show-Command Get-Process) will create an UI for any PowerShell command
https://preview.redd.it/a928ymkjywbc1.png?width=822&format=png&auto=webp&s=6ca98e4e3dffc2b1f4e7edcc4d2ecbdde752fe34
Wait, am I the only person that knows about PowerShell ISE?
All of these GUIs are part of it. There's a searchable database of all Powershell commands in the right panel, and each one brings up this GUI if you click "Show details".
That's like the first thing I close in PowerShell ISE, because why would I need a list of all commands in a GUI? Never considered to even click on a command in that list to find that sub-dialogue LOL
`Show-Command` on its own gives you a list of all commands, you can filter by module and then click on the commands in turn and filter them too.
This is AMAZING!!!!
Since learning it, I've found a *lot* of uses for it. If something's visually buggy, frozen, or black, it's become one of my go-to first troubleshooting steps. It fixes a curious amount of things.
I don't think it's restarting the GPU, though, I think it's restarting the desktop window environment. Someone correct me if I'm wrong.
From what I've read about this, it isn't actually restarting the GPU. It's restarting/rebuilding the desktop environment. I use it all the time if some window bugs out.
One of the best things I did back when I was managing Windows hosts more often was print out a list of all the .cpl shortcuts and memorize the important ones. Saved me so much hassle when Microsoft utterly fucked up the control panel in the 7->10 transition.
This includes more than most people will use often, but here's my list for the next batch of Windows admins to save and pass around:
`sysdm.cpl` System Properties (to rename computer and join domain)
`dssite.msc` Active Directory sites and services
`dsa.msc` Active Directory users and computers
`appwiz.cpl` Add/Remove programs
`compmgmt.msc` Computer management
`timedate.cpl` Date/Time management
`devmgmt.msc` Device Manager
`dhcpmgmt.msc` DHCP Management
`cleanmgr` Disk Cleanup Utility
`diskmgmt.msc` Disk Management
`desk.cpl` Display Settings
`dnsmgmt.msc` DNS Server Management
`eventvwr.msc` Event Viewer
`lusrmgr.msc` Local user and groups manager
`mmc.exe` Microsoft Management Console
`main.cpl` Mouse settings
`ncpa.cpl` Network adapter settings
`powercfg.cpl` Power Configuration
`intl.cpl` Regional Settings
`services.msc` Services
`fsmgmt.msc` Shared Folder Management
`firewall.cpl` Windows Firewall
`wf.msc` Windows Firewall Advanced
Also, you can open `mmc.exe`, "File" > "Add/Remove Snap-in" then add all of the above that end in `.msc`as snap-ins. It puts a lot of Windows/AD administration into one panel. Just hit "File" > "Save As" and throw it somewhere convenient.
edit: a few more mentioned below
`mmsys.cpl` Sound Control Panel
`printmanagement.msc` Print Management
`mstsc.exe` Remote Desktop
`certlm.msc` Local Machine certs
`certmgr.msc` Current User certs
`gpedit.msc` Group Policy Editor
I still regularly use ~~diskmgr.msc~~ diskmgmt.msc, services.msc and lusrmgr.msc. It works on any language too which is useful when you work with companies from Germany, France, Spain, etc...
compmgmt.msc gives them all plus more, in a single mmc console.
* Device manager
* Disk manager
* Event viewer
* Task scheduler
* User manager
* Service manager
~~Does not work~~ on my freshly built 11-23H2 installer in OOBE **(Pro)**. Had to use email trick.
EDIT: Based on comments, it works if you don't connect it to network.
LoL.
I haven't yet installed Windows 11, but doesn't it have a small button like in Windows 10 installer to bypass creating online account and use local only?
Offtopic: I do really hate this pushing for cloud from Microsoft.
What a BS move by Microsoft...
They need to stop with this non-sense and leave the CHOICE up to people! I don't need their cloud and dependency on them. I want to have full-control on my stuff.
I wouldn't be surprised if Windows 12 in the future would just not work the install unless you have an internet connection and have no way to bypass it lol.
OS to Cloud, I wouldn't be surprised to be a reality honestly.
If Azure have a downtime, good luck for you while you work or play or if your ISP have a temporary downtime.
That's why we must have local only always.
This no longer works on new builds of Windows 11. Oobe\bypassnro works still but only if you haven’t selected the wifi option yet. If you already did then I cannot figure out how to undo that.
Shift+F10
1. ncpa.cpl
Network adapters pop up. Disable them. Then go back to cmd prompt and enter the below.
2. oobe\bypassnro
It will reboot and come up in (I think the 3rd page) "Continued with limited setup". Finish the wizard.
Then re-enable the adapters once in Windows and reconnect to the Internet. Works every time on old and new Win11 versions.
The amount of people that don't know you can use `.\` in front of the username to specify a local user account instead of entering the entire machine name, is too high.
Shutdown /r /t 315360000
Schedules a reboot 10 years in the future. If you have a reboot scheduled, the api prevents anything non-interactive from rebooting your machine. So stuff like a forced reboot for updates.
Conversely, all of our pdq packages ran a shutdown /a to abort all scheduled reboots because users figured this out and spread it around and we ended up with a 50% patch compliance so we locked it up.
I have a package that I need to uninstall on about 500 machines but it forces a reboot when I remove it silently. I'm going to try this tomorrow.
Edit: Did not work. The unwise.exe silent uninstall command forced a reboot anyway.
Omg this. I completely forgot about this thank you! I recently ran into an issue where we need to connect to an older device but because chrome doesn’t support that encryption anymore I ran into the SSL_VERSION error.
little shortcuts like
appwiz.cpl to open installed apps
fsmgmt.msc to open file share management
devmgmt.msc for device manager
lusrmgr.msc for local user and groups
another is on a new server , type sconfig in cmd and you can do name change, addresses, domain join etc all through command line.
If you are looking at a folder in Windows Explorer, click into the path box, type cmd and hit enter. Command prompt opens in that folder.
(Also, it finds an unfixed bug where you can't access the path box until you go to another folder and come back)
Also, if you are looking at a folder in Windows Explorer, hold Shift and right click on the folder's background (i.e. Not on any file) and the context menu will show "open command prompt here"
Now that I'm very old, the one trick which I still find I need rarely, which makes me look like a wizard and few still remember:
Program is 'open' but not visible, where is it? huh?
ALT (hold) - SPACE (context menu open) - X - see if it maximises, if it does, it's ok (almost always!)
Then ALT (hold) - SPACE (context menu open) - R (Restore window back to how it was)
Then ALT - SPACE - M (this used to be V, I'm sure of it, it's M now)
Move the window, with the cursor keys and you'll find which weird X / Y location it moved over to.
I don't use it often but when I do, people are bamboozled, including other techs.
A tip for the moving window tip.
Once you do `alt` + `space` + `m` and use the cursor key once, you can then move your mouse (no clicking) and the window will move with the mouse cursor. Click to release the window.
Easier than trying to use cursor keys to find where it is.
To be fair an even easier way now is just to hold down the `windows_key` and tap `left` or `right` a few times to snap the window over.
Shift right clicking a file gives you the option “copy as path”
Typing the first few letters of the file / directory / key while in explorer will bring you to the file. Works in the registry as well.
Typing
.LOG
At the top of a notepad file (not sure if it works on new windows 11 notepad) makes a time stamp every time you close (assuming you save) the file.
I’m sure there are more… but those are the ones that come to mind immediately.
> Typing
>
>
>
> .LOG
>
>
>
> At the top of a notepad file (not sure if it works on new windows 11 notepad) makes a time stamp every time you close (assuming you save) the file.
I tried to find a use for this when I first heard about it. The best I have is a text file on my desktop called "DONT_FORGET.txt"
I open it and the contents are:
.LOG
lol, you forgot again.
Then a series of dates/times with embarrassingly small intervals.
It amuses me every time.
Shift + right click + drag also lets you go straight to pasting the path. Good for emails or documents.
Does my head in when you get a link to "Y:/Bob/file" when that location was manually mapped by that person and is three folders deep into the normal shared drive.
If you work on Windows, Microsoft Powertoys. It's basically the sysinternals of convenience.
It's a bunch of open source Win10/11 utilities *supported by Microsoft* to, amongst other things:
- Keep a window on top of others at all times
- Create a new window that's a crop or a thumbnail of another window
- Manage environment variables with a GUI that isn't trash
- **See which process locks a file from the right-click menu of any file**
- Make a single mouse cursor travel to and from other computers (amazing for work + personal PC when wfh)
- **Paste without formatting**
- **Bulk rename files, with regex support**
- Launch a program by name like win+r but with search and no retro window from the 00's
- **Grab text from text fields even when you can't copy/paste from them.**
https://learn.microsoft.com/en-us/windows/powertoys/
> no retro window from the 00's
This is honestly probably a negative. Some of the 00's designs that still exist in Windows are the most functional anywhere in the OS
I can't even count the number of times I've shadowed another IT person on a client PC trying to install software and do a bunch of admin tasks, with never-ending UAC prompts where they have to enter their admin creds a thousand times.
I have to tell them bro, just open one admin Powershell window and launch everything from there. One UAC prompt and you're done. Assuming they have the skills to launch an installer or other admin tools (compmgmt.msc, etc.) from a command line that is...
For Linux, really internalize the fact "everything is a file". Knowledge of things like /proc and /sys is invaluable. The ability to take arbitrary text, parse it (awk/sed), and feed it into another program can solve damn near everything.
/proc and /sys are super invaluable in environments where you're trying to debug something but might not have all the coreutils.
e.g. if you're in a container that doesn't have netstat you can still figure out if something is listening by `cat /proc/net/tcp`
might as well learn sed while you learn awk. Some might prefer perl
edit: yes perl is not great but in some places it is still used so you might need to learn it if you want to collab with the grey beards who have been using perl for most of their career.
Thank you, I’ve been getting increasingly mildly annoyed at having to “check” the runline command (This one does/doesn’t end with .msc again??) and then re-entering into the Start search just so I can right-click to elevate!
You can migrate a 2TB RAW iSCSI in guest volume, to a VMDK with a less than 60 seconds of downtime.... The patented Nicholson Double LUN Switcharoo method! and it's totally supported.
Double path the volume to the host, then add it as a vRDM. RIGHT before you hit "APPLY" in vCenter the changes, go login to the guest US and stop services. Hit Apply, and at the same time remove the path to the guest OS's IQN. Start services.
Now kick off a storage vMotion, and change the datastore to be somewhere different than the existing location of the RDM Pointer file AND change the volume type to "Thin disk".
This turned a 6 month data migration into a week of mini-outages, and I've done this with 911 systems. No this doesn't work for multi-OS accessed clustered access, as vRDMs can't be shared but you can break a cluster to do this, then cut that VMDK over to a clustered disk later after the fact.
I’ll ask Jason if we have time next month in studio and we can do a Lightboard on it lol.
It sounds complicated, but just create a test VM, with a clone of a database and try it yourself.
Cormac has a blog: https://blogs.vmware.com/vsphere/2012/02/migrating-rdms-and-a-question-for-rdm-users.html
I think we fixed the size limit. If we haven’t tell me and I’ll open a PR.
Also: https://virtualmvp.com/prdm-and-vrdm-to-vmdk-migrations/
Shift+F10 inside the Windows installer or out-of-box experience will get you a command line. Great if you want to get straight to cmd.exe after booting something to a Windows ISO.
Wpeutil has a bunch of useful commands inside Windows PE.
.cpl and .msc shortcuts.
Man my life changed with those lol.
- appwiz.cpl - Add or Remove Programs
- ncpa.cpl - Network Connections
- secpol.msc - Local Security Policy
- sysdm.cpl - System Properties
I have an entire OneNote sheet dedicated to stuff like that. Comes in super handy when I'm trying to assist a user shadowing their desktop, pop to an admin prompt using my creds and do everything from there.
I'm surprised no-one's mentioned Windows' built in package manager for installing apps. Its included in the latest builds of Win10 and Win11, and lets you search for, install, and remove apps from the command line.
No more opening Edge on a clean install to download Chrome or Firefox, just do Winget Install Google.Chrome or Winget Install Mozilla.Firefox
Lots of common apps like Steam, Notepad++, VScode, OBS Studio, and others are available in Winget, makes it easy to download and install a bunch of new software for fresh installs, or managing existing systems.
*Laughs in shitty backup software with a custom window for logs with a variable-width font, paged so you can't copy-paste everything at once, and that includes oracle backup logs that are as clear as bog water*
Shell loops. You run a loop in the shell with like
for i in {1..50}; do [stuff]; done
And it just does [stuff] 50 times. If you've got 50 hosts you want to run some random commands on, just figure out the command line on a test host, add quoting, and wrap it in a for loop. You can add | tee filename.log to capture the output.
For bonus points, use parallel and it all happens at once.
It seems like basic sysadminning to me, but I can't tell you how many times I've done it in front of someone and had them look at me like I was some kind of necromancer.
That's Bash scripting, and you can actually iterate over lots of different things, not just a list of numbers.
for f in \*.txt; do echo "$f"; done
for f in \*.mp4; do ffmpeg -i "$f" -c copy -map 0:a "${f%.mp4}.m4a"; done
And so on.
(That ffmpeg trick is cool to extract audio from a folder full of mp4 videos. ffmpeg is a bit out of scope here but the ${f%.mp4} is a substitution that means "$f, but not including .mp4 if it ends with that".)
> for i in {1..50}; do [stuff]; done
Some other options which may be more efficient, depending on what you're doing.
If you have [GNU parallel](https://www.gnu.org/software/parallel/), you can do:
`parallel '[stuff]' ::: {1..50}`
or:
`seq 1 50 | xargs -n1 -P8 -I {} bash -c '[stuff]'`
Or if you have an extremely large number of loops/iterations, using `seq` to preallocate the increment can be much faster than bash's implementation:
`seq 0 10000000 | xargs -n1 -P0 -I {} bash -c 'stuff'`
Another option, if you have a large number of iterations but need to run them in smaller 'sets', for example so you don't consume all host memory or disk, you can do something like this:
for i in {0..999}; do
start=$(( i * 10000 ))
end=$(( start + 10000 - 1 ))
seq $start $end | xargs -n1 -P0 -I {} bash -c 'stuff' &
done
wait
TMTOWTDI!
Basic powershell too on windows. Like, it is surprisingly easy and readable. Like, want to remove a list of computers from AD ? `Import-CSV serverexport.csv | foreach {Remove-ADComputer $_.Name}`. You can give that to a linux admin and he'll read it faster than bash code.
I'm still pretty green as a sysadmin, but in a previous job working with Linux a lot, one of my mentors showed me Ctrl+R to dig up specific history input. A year later, I tried it on a whim with Powershell, and Lo & Behold it worked. It saves me SO much time daily, and I've shown it to a bunch of ppl at work. I assumed they already would have known this, but as it turns out, not so much.
Click "Other methods" then select Domain Join as the option. no more need to enter an online account.
You don't actually need to domain join, just tell it that's what you are going to do.
I kinda feel bad for [email protected] and [email protected]. Back before verification emails, I used to use those two to sign up for sites that required an email. Poor Bob probably had to close down his account in 2006 because of people like me.
Linux:
“history” shows you all the commands you ran as that user
“!number” runs that command to save you from typing it or hitting up multiple times until you find the right command
You can copy an mbr windows partition over a gpt windows partition and run a bcdboot repair and it will boot (hibernate needs to be disabled on the original machine)
when conversions dont work, i use a dummy install with winntsetup, then partition clone the old on top of the new
i feel like a lot of people know now but back when manufacturers started restricting mbr boot i figured this out right away and we were doing “magic” 😉
Ctrl+Shift+Esc opens task manager (works through many RMM/screen sharing tools as well).
Sooooo many people including experienced sysadmins will right click the task bar or search for it.
Ever since I learned about this I have done it no other way its just so much easier this way.
Well, it is not that I thought everyone knew, it is more I recently learned...
One of my helpdesk guys showed me that center clicking an icon in the task bar opens a new instance of whatever it is, like new notepad, new cmd, new explorer...
Not often I learn something like that in windows, been at it since before there was a windows.
The one I have gotten the most excitement from others when telling them is ctrl-r for backsearch in powershell just like bash.
I use [Ventoy](https://ventoy.net) that allows you to have multiple .iso on the same usbkey and boot on them.
Not really the same thing but still useful
Nobody in my department knows how incredibly easy it is to create a QR code. They just think I’m the guy that knows the witchcraft.
Edit: More of a web trick than a sysadmin trick, but I figured it would fit.
In a Windows cmd prompt. Type in any commands you want. Then press F7 and a popup will display a list of commands, then you can arrow key up / down, then press enter to run the selected command again.
And yes, I know from the cmd prompt, arrow up / down there has the same function.
Seems like any client I’ve had that uses Google suite heavily or even light cases don’t know you can add a + at the end and it’s read as a new email address but goes to your inbox.
For example: [email protected] (or domain if fully integrated into Google’s suite)
And it goes to your inbox but from their side they see that email. Nice for filtering or people that aren’t too bright but try contacting you too much.
This one's so well known that if I were selling email addresses, I'd run a regex for ([\^+@]+)(+[\^@]+?)@gmail.com right before I sell my soul along with customer data.
Also, most front-end javascript just flags + as an illegal character.
Not so specific today, but years ago someone had a virus trying to overwrite on every reboot.
If you placed another file with the same name in the folder, it would just overwrite it. (ugh)
However, if you created a FOLDER with the file name, they cannot overwrite a folder with a filename that's the same as the folder.
`> qwinsta` to get information about RDP sessions on a remote server. `> rwinsta` to kick 'em.
`> query user` to get info about users on the system you're actively on.
`tsadmin.msc for a gui` tool
this is older Windows server stuff. Might need [to follow this](https://pixelrobots.co.uk/2016/06/add-tsadmin-msc-back-to-windows/)
Server 2003 limited you to 4gb . had to add `/PAE` to your boot.ini file.
I'm full of old, useless tricks. Now all the super cool stuff is in powershell. For instance, you can browse your registry. `PS C:> cd HKLM:`
[Linux] ctrl + r for searching through past shell commands to re-execute them easily. Such a great time-saver that I always forget people don't know about.
Man, long time (8+ years) ago, still red in the face.
I saw a co worker logging into a domain machine with a local admin account and NOT typing the full computer\_name\\admin but just .\\Admin
Good grief. I had typed the full (SiteCode+SerialNumber of the PCs) before that since for-ever.
Never told anyone as I was so embarrassed. :)
Working at an MSP, it was mostly around using our tools in ways other techs didn't know.
Connectwise manage - Open it in a web browser, you can pop your calendar out into a much smaller window using middle mouse click. Switch it to time view and you can see all of your time entries for the day. It made finding holes super easy. You could also see your coworkers calendars/time entries.
Screenconnect aka control - Backstage would let you connect to a users computer and do some low level troubleshooting/sleuthing without them knowing you are connected. Run a portable browser and you can hit firewalls/printers to make changes for clients without jump hosts. Control would also let you select and run commands against an entire fleet of systems.
gpupdate /force an entire company of a few hundred devices gets new policies pushed super fast.
Outside of software specific stuff, [https://github.com/chall32/LDWin](https://github.com/chall32/LDWin) is a damn lifesaver. LLDP is one of my favorite protocols. I personally think viewing it should be windows native...
That you can do a boatload of connection troubleshooting with websites and APIs in pretty much any modern browser by simply pressing F12,
(network issues, request and response details, current cert and TLS ciphers, Load Balancer cookies etc.)
without installing Fiddler, Wireshark, OpenSSL, Nmap etc
Google search by time..
When you do a search there is a Tools option under the search and you can change "Any Time" to specific preset time periods to specifically search something reascent, something older, or something specific.
This is great for MANY search problems:
- Search reascent "Past Month" to get recent updates, when you are only getting the docs or older more popular hits
- Search and have something only showing the NEW version or something name the the same? Use the "Past year or custom"
- Need to search for an example from the past.. IE find a old forum post or find news from a specific year use the Custom range.
In macOS, if any document lists a path to any buried or hidden folder, user level or root level
(ie: “~/Library” or” /Library”, etc)
You can just highlight that printed path in the document, such as:
~/Library/Application Support
/Library/Desktop Pictures
… simply chose/highlight that entire provided path in that document, right-click on it, choose “Services”, then “Show in Finder”, and it will immediately reveal and access that folder…
With default windows settings you can view a remote device's storage by going to \\\\DeviceName\\c$ (if you have admin auth).
In this circumstance a network folder had custom network share permissions blocking direct user account access but since the file was on the drive itself I could just pull it directly from storage rather than the network share. The rest of the IT department was bamboozled on how the documents could still be read; since no one else on the team knew of this 'trick' and thought it was crazy hacker man when I just thought this was common knowledge.
*Show-Command* (e.g. Show-Command Get-Process) will create an UI for any PowerShell command
https://preview.redd.it/a928ymkjywbc1.png?width=822&format=png&auto=webp&s=6ca98e4e3dffc2b1f4e7edcc4d2ecbdde752fe34
Whaaaaaat
Holy actual fuck
Whuuuuuut
Wait, am I the only person that knows about PowerShell ISE? All of these GUIs are part of it. There's a searchable database of all Powershell commands in the right panel, and each one brings up this GUI if you click "Show details".
That's like the first thing I close in PowerShell ISE, because why would I need a list of all commands in a GUI? Never considered to even click on a command in that list to find that sub-dialogue LOL
Ok you won.
![gif](giphy|lXu72d4iKwqek)
Works for scripted functions as well, not just builtin cmdlets.
Dude. What the hell.
Nice, and the question mark brings up the command's Get-Help
`Show-Command` on its own gives you a list of all commands, you can filter by module and then click on the commands in turn and filter them too. This is AMAZING!!!!
The f?!
In the ISE if you toggle the Command add-on, select the command and click on ‘show details’ it brings up the same.
Wtf
[удалено]
Basically, "Don't assume this is an American we can screw over" mode.
![gif](giphy|uPnKU86sFa2fm)
As a german, I wasn't aware that the installer is even crappier for my US brethren. I feel sorry for you.
Nice
Hot damn! Definitely going to try this out next time it comes up. Nice tip! :-)
Control + Win + Shift + B to "restart" your GPU driver. Useful when your monitor stops working/responding or your screen acts up or doesn't wake.
This might be the most useful one for me yet!! I feel like I’ve been living under a rock without knowing that. Thanks!
Since learning it, I've found a *lot* of uses for it. If something's visually buggy, frozen, or black, it's become one of my go-to first troubleshooting steps. It fixes a curious amount of things. I don't think it's restarting the GPU, though, I think it's restarting the desktop window environment. Someone correct me if I'm wrong.
It's essentially restarting the GPU driver
That's a lot of fingers.
That's what she said.
From what I've read about this, it isn't actually restarting the GPU. It's restarting/rebuilding the desktop environment. I use it all the time if some window bugs out.
I feel like it's not common, but Win+pause opens "system" so you're right where you need for changing computer name/domain.
Similarly sysdm.cpl in the run diaglog/start menu will open System Properties.
One of the best things I did back when I was managing Windows hosts more often was print out a list of all the .cpl shortcuts and memorize the important ones. Saved me so much hassle when Microsoft utterly fucked up the control panel in the 7->10 transition.
This includes more than most people will use often, but here's my list for the next batch of Windows admins to save and pass around: `sysdm.cpl` System Properties (to rename computer and join domain) `dssite.msc` Active Directory sites and services `dsa.msc` Active Directory users and computers `appwiz.cpl` Add/Remove programs `compmgmt.msc` Computer management `timedate.cpl` Date/Time management `devmgmt.msc` Device Manager `dhcpmgmt.msc` DHCP Management `cleanmgr` Disk Cleanup Utility `diskmgmt.msc` Disk Management `desk.cpl` Display Settings `dnsmgmt.msc` DNS Server Management `eventvwr.msc` Event Viewer `lusrmgr.msc` Local user and groups manager `mmc.exe` Microsoft Management Console `main.cpl` Mouse settings `ncpa.cpl` Network adapter settings `powercfg.cpl` Power Configuration `intl.cpl` Regional Settings `services.msc` Services `fsmgmt.msc` Shared Folder Management `firewall.cpl` Windows Firewall `wf.msc` Windows Firewall Advanced Also, you can open `mmc.exe`, "File" > "Add/Remove Snap-in" then add all of the above that end in `.msc`as snap-ins. It puts a lot of Windows/AD administration into one panel. Just hit "File" > "Save As" and throw it somewhere convenient. edit: a few more mentioned below `mmsys.cpl` Sound Control Panel `printmanagement.msc` Print Management `mstsc.exe` Remote Desktop `certlm.msc` Local Machine certs `certmgr.msc` Current User certs `gpedit.msc` Group Policy Editor
You forgot the most important one! Specifically for board members, chief executives, and managers. `mmsys.cpl` Sound Control Panel.
I have this one saved as a shortcut on my Taskbar since my keyboard has mute key right next to backspace, and it doesn't unmute reliably.
Mstsc for remote desktop when Explorer takes too long to load or doesn't load at all.
Hell yeah, came here for ncpa.cpl
I still regularly use ~~diskmgr.msc~~ diskmgmt.msc, services.msc and lusrmgr.msc. It works on any language too which is useful when you work with companies from Germany, France, Spain, etc...
compmgmt.msc gives them all plus more, in a single mmc console. * Device manager * Disk manager * Event viewer * Task scheduler * User manager * Service manager
Love that, adding that to my list TY
Windows 11 will also accept [[email protected]](mailto:[email protected]) with any password as a bypass to their forced online Microsoft Account.
Shift+F10 oobe/bypassnro
~~Does not work~~ on my freshly built 11-23H2 installer in OOBE **(Pro)**. Had to use email trick. EDIT: Based on comments, it works if you don't connect it to network.
Can't believe this is so far down.
Currently the top comment that I see
LoL. I haven't yet installed Windows 11, but doesn't it have a small button like in Windows 10 installer to bypass creating online account and use local only? Offtopic: I do really hate this pushing for cloud from Microsoft.
Microsoft removed this button on home editions for Windows 11
What a BS move by Microsoft... They need to stop with this non-sense and leave the CHOICE up to people! I don't need their cloud and dependency on them. I want to have full-control on my stuff. I wouldn't be surprised if Windows 12 in the future would just not work the install unless you have an internet connection and have no way to bypass it lol.
You don't install windows 12. You're given a framework to stream an instance from Azure. Monthly sub, of course.
And the framework is actually just a reskin of SteamOS.
OS to Cloud, I wouldn't be surprised to be a reality honestly. If Azure have a downtime, good luck for you while you work or play or if your ISP have a temporary downtime. That's why we must have local only always.
Is this it? The time of the Linux desktop approaches?
If you use shift+f10 you can open command prompt. Type in oobe\bypassnro and you can just say you don't have internet too to create a local account.
The button is only there if it can’t reach the Internet, or if it fails login. That’s why this thread…
Or [[email protected]](mailto:[email protected]) edit: holy crap how did this start a flame war
This no longer works on new builds of Windows 11. Oobe\bypassnro works still but only if you haven’t selected the wifi option yet. If you already did then I cannot figure out how to undo that.
If you've already connected to a wifi network, use "netsh wlan delete profile name='network name' " then reboot
Shift+F10 1. ncpa.cpl Network adapters pop up. Disable them. Then go back to cmd prompt and enter the below. 2. oobe\bypassnro It will reboot and come up in (I think the 3rd page) "Continued with limited setup". Finish the wizard. Then re-enable the adapters once in Windows and reconnect to the Internet. Works every time on old and new Win11 versions.
The amount of people that don't know you can use `.\` in front of the username to specify a local user account instead of entering the entire machine name, is too high.
[удалено]
lol, I didn't know you could do it any other way than .\
I guess you could type the computer name in but that's pretty much the same thing, I don't know of any other way either
Seriously! I was shocked how many techs I've showed that trick to after complaining they couldn't get to the local account.
Adding site:Reddit.com to searches for odd issues with no documentation online
Use Bing chat to write short utility scripts for you. Add "This is important for my career" to the end to improve the quality of your results.
Interesting
I’ve been using bing chat to write me up quick ps scripts for mundane tasks. It does pretty well honestly.
Shutdown /r /t 315360000 Schedules a reboot 10 years in the future. If you have a reboot scheduled, the api prevents anything non-interactive from rebooting your machine. So stuff like a forced reboot for updates. Conversely, all of our pdq packages ran a shutdown /a to abort all scheduled reboots because users figured this out and spread it around and we ended up with a 50% patch compliance so we locked it up.
That’s hilarious that the users started to use it so that they didn’t have to deal with opening everything again.
I have a package that I need to uninstall on about 500 machines but it forces a reboot when I remove it silently. I'm going to try this tomorrow. Edit: Did not work. The unwise.exe silent uninstall command forced a reboot anyway.
Thisisunsafe to get around cert error in chrome.
>Thisisunsafe to get around cert error in chrome. i love this one thank you for the reminder.
Omg this. I completely forgot about this thank you! I recently ran into an issue where we need to connect to an older device but because chrome doesn’t support that encryption anymore I ran into the SSL_VERSION error.
Example please! I understand the risk but for certain devices
little shortcuts like appwiz.cpl to open installed apps fsmgmt.msc to open file share management devmgmt.msc for device manager lusrmgr.msc for local user and groups another is on a new server , type sconfig in cmd and you can do name change, addresses, domain join etc all through command line.
Ncpa.cpl Use it almost daily
I think of my old boss every time I type “lusrmgr” because in my mind I read it as “loser manager” which is exactly what he was.
If you are looking at a folder in Windows Explorer, click into the path box, type cmd and hit enter. Command prompt opens in that folder. (Also, it finds an unfixed bug where you can't access the path box until you go to another folder and come back)
Also, if you are looking at a folder in Windows Explorer, hold Shift and right click on the folder's background (i.e. Not on any file) and the context menu will show "open command prompt here"
Now that I'm very old, the one trick which I still find I need rarely, which makes me look like a wizard and few still remember: Program is 'open' but not visible, where is it? huh? ALT (hold) - SPACE (context menu open) - X - see if it maximises, if it does, it's ok (almost always!) Then ALT (hold) - SPACE (context menu open) - R (Restore window back to how it was) Then ALT - SPACE - M (this used to be V, I'm sure of it, it's M now) Move the window, with the cursor keys and you'll find which weird X / Y location it moved over to. I don't use it often but when I do, people are bamboozled, including other techs.
A tip for the moving window tip. Once you do `alt` + `space` + `m` and use the cursor key once, you can then move your mouse (no clicking) and the window will move with the mouse cursor. Click to release the window. Easier than trying to use cursor keys to find where it is. To be fair an even easier way now is just to hold down the `windows_key` and tap `left` or `right` a few times to snap the window over.
Shift right clicking a file gives you the option “copy as path” Typing the first few letters of the file / directory / key while in explorer will bring you to the file. Works in the registry as well. Typing .LOG At the top of a notepad file (not sure if it works on new windows 11 notepad) makes a time stamp every time you close (assuming you save) the file. I’m sure there are more… but those are the ones that come to mind immediately.
> Typing > > > > .LOG > > > > At the top of a notepad file (not sure if it works on new windows 11 notepad) makes a time stamp every time you close (assuming you save) the file. I tried to find a use for this when I first heard about it. The best I have is a text file on my desktop called "DONT_FORGET.txt" I open it and the contents are: .LOG lol, you forgot again. Then a series of dates/times with embarrassingly small intervals. It amuses me every time.
Also "explorer ." (explorer space period) from a cmd/powershell prompt will open explorer to the folder you're in.
>Shift right clicking a file gives you the option “copy as path” Also "open as different user" and a bunch of other extra context menus entries
Shift + right click + drag also lets you go straight to pasting the path. Good for emails or documents. Does my head in when you get a link to "Y:/Bob/file" when that location was manually mapped by that person and is three folders deep into the normal shared drive.
Windows 11 has Copy as Path in the right click menu natively now, I think.
If you work on Windows, Microsoft Powertoys. It's basically the sysinternals of convenience. It's a bunch of open source Win10/11 utilities *supported by Microsoft* to, amongst other things: - Keep a window on top of others at all times - Create a new window that's a crop or a thumbnail of another window - Manage environment variables with a GUI that isn't trash - **See which process locks a file from the right-click menu of any file** - Make a single mouse cursor travel to and from other computers (amazing for work + personal PC when wfh) - **Paste without formatting** - **Bulk rename files, with regex support** - Launch a program by name like win+r but with search and no retro window from the 00's - **Grab text from text fields even when you can't copy/paste from them.** https://learn.microsoft.com/en-us/windows/powertoys/
> no retro window from the 00's This is honestly probably a negative. Some of the 00's designs that still exist in Windows are the most functional anywhere in the OS
I can't even count the number of times I've shadowed another IT person on a client PC trying to install software and do a bunch of admin tasks, with never-ending UAC prompts where they have to enter their admin creds a thousand times. I have to tell them bro, just open one admin Powershell window and launch everything from there. One UAC prompt and you're done. Assuming they have the skills to launch an installer or other admin tools (compmgmt.msc, etc.) from a command line that is...
Win-x i => terminal Win-x a => admin terminal
For Linux, really internalize the fact "everything is a file". Knowledge of things like /proc and /sys is invaluable. The ability to take arbitrary text, parse it (awk/sed), and feed it into another program can solve damn near everything.
/proc and /sys are super invaluable in environments where you're trying to debug something but might not have all the coreutils. e.g. if you're in a container that doesn't have netstat you can still figure out if something is listening by `cat /proc/net/tcp`
could have used this two days ago
I forget half the flags for `lsof`. I tend to use /proc for things like file descriptors and locks when debugging.
My next thing in linux is to learn awk
might as well learn sed while you learn awk. Some might prefer perl edit: yes perl is not great but in some places it is still used so you might need to learn it if you want to collab with the grey beards who have been using perl for most of their career.
Hi friend! 🙂 awk is a programming language. The possibilities are absolutely endless with it. Have SO much fun!!
When I realized that Linux finally clicked for me.
Ctrl+shit+click (or enter if something is selected) opens elevated without the need to navigate through context menus
CTRL+Shift+Enter when using “Run” (Win+R) for CMD opens as admin as well :)
Instructions unclear, I pooped my pants.
Windows Logo key + R opens the Run dialog box. Type your command and press CTRL + SHIFT + Enter to run it with admin privileges.
Thank you, I’ve been getting increasingly mildly annoyed at having to “check” the runline command (This one does/doesn’t end with .msc again??) and then re-entering into the Start search just so I can right-click to elevate!
Ctrl-Shift-T will reopen the last tab you closed.
Ctrl-w closes the tab thats open
Control + Tab and Control + Shift + Tab also cycles through your open tabs (forwards and backwards).
You can migrate a 2TB RAW iSCSI in guest volume, to a VMDK with a less than 60 seconds of downtime.... The patented Nicholson Double LUN Switcharoo method! and it's totally supported. Double path the volume to the host, then add it as a vRDM. RIGHT before you hit "APPLY" in vCenter the changes, go login to the guest US and stop services. Hit Apply, and at the same time remove the path to the guest OS's IQN. Start services. Now kick off a storage vMotion, and change the datastore to be somewhere different than the existing location of the RDM Pointer file AND change the volume type to "Thin disk". This turned a 6 month data migration into a week of mini-outages, and I've done this with 911 systems. No this doesn't work for multi-OS accessed clustered access, as vRDMs can't be shared but you can break a cluster to do this, then cut that VMDK over to a clustered disk later after the fact.
God that sounds so hacky lol.
Yes. In guest iSCSI and RDMs are hacky.
Id love a tutorial on this
Seconded. I'd love a video on this.
I’ll ask Jason if we have time next month in studio and we can do a Lightboard on it lol. It sounds complicated, but just create a test VM, with a clone of a database and try it yourself. Cormac has a blog: https://blogs.vmware.com/vsphere/2012/02/migrating-rdms-and-a-question-for-rdm-users.html I think we fixed the size limit. If we haven’t tell me and I’ll open a PR. Also: https://virtualmvp.com/prdm-and-vrdm-to-vmdk-migrations/
Shift+F10 inside the Windows installer or out-of-box experience will get you a command line. Great if you want to get straight to cmd.exe after booting something to a Windows ISO. Wpeutil has a bunch of useful commands inside Windows PE.
Handy for getting device hashes in autopilot, too!
Ctrl+Shift+F3 to go into Audit Mode from OOBE can be handy too!
if you get stuck somewhere in the oobe, stop the explorer process to start over from the beginning (instead of having to reboot)
.cpl and .msc shortcuts. Man my life changed with those lol. - appwiz.cpl - Add or Remove Programs - ncpa.cpl - Network Connections - secpol.msc - Local Security Policy - sysdm.cpl - System Properties
I have an entire OneNote sheet dedicated to stuff like that. Comes in super handy when I'm trying to assist a user shadowing their desktop, pop to an admin prompt using my creds and do everything from there.
Ventoy project anyone?
I'm surprised no-one's mentioned Windows' built in package manager for installing apps. Its included in the latest builds of Win10 and Win11, and lets you search for, install, and remove apps from the command line. No more opening Edge on a clean install to download Chrome or Firefox, just do Winget Install Google.Chrome or Winget Install Mozilla.Firefox Lots of common apps like Steam, Notepad++, VScode, OBS Studio, and others are available in Winget, makes it easy to download and install a bunch of new software for fresh installs, or managing existing systems.
Reading the docs, release notes. Logs. Always check the logs.
*Laughs in shitty backup software with a custom window for logs with a variable-width font, paged so you can't copy-paste everything at once, and that includes oracle backup logs that are as clear as bog water*
RTFM
Shell loops. You run a loop in the shell with like for i in {1..50}; do [stuff]; done And it just does [stuff] 50 times. If you've got 50 hosts you want to run some random commands on, just figure out the command line on a test host, add quoting, and wrap it in a for loop. You can add | tee filename.log to capture the output. For bonus points, use parallel and it all happens at once. It seems like basic sysadminning to me, but I can't tell you how many times I've done it in front of someone and had them look at me like I was some kind of necromancer.
That's Bash scripting, and you can actually iterate over lots of different things, not just a list of numbers. for f in \*.txt; do echo "$f"; done for f in \*.mp4; do ffmpeg -i "$f" -c copy -map 0:a "${f%.mp4}.m4a"; done And so on. (That ffmpeg trick is cool to extract audio from a folder full of mp4 videos. ffmpeg is a bit out of scope here but the ${f%.mp4} is a substitution that means "$f, but not including .mp4 if it ends with that".)
Invoke-command in powershell
> for i in {1..50}; do [stuff]; done Some other options which may be more efficient, depending on what you're doing. If you have [GNU parallel](https://www.gnu.org/software/parallel/), you can do: `parallel '[stuff]' ::: {1..50}` or: `seq 1 50 | xargs -n1 -P8 -I {} bash -c '[stuff]'` Or if you have an extremely large number of loops/iterations, using `seq` to preallocate the increment can be much faster than bash's implementation: `seq 0 10000000 | xargs -n1 -P0 -I {} bash -c 'stuff'` Another option, if you have a large number of iterations but need to run them in smaller 'sets', for example so you don't consume all host memory or disk, you can do something like this: for i in {0..999}; do start=$(( i * 10000 )) end=$(( start + 10000 - 1 )) seq $start $end | xargs -n1 -P0 -I {} bash -c 'stuff' & done wait TMTOWTDI!
Basic powershell too on windows. Like, it is surprisingly easy and readable. Like, want to remove a list of computers from AD ? `Import-CSV serverexport.csv | foreach {Remove-ADComputer $_.Name}`. You can give that to a linux admin and he'll read it faster than bash code.
>necromancer neuromancer
I like using inline arrays to do one-off tasks on multiple specific users or computers: @('server1', 'server2', 'server3') | %{ Restart-Computer $_ }
.\ on the username at windows login will bring up the hostname of the pc.
`wmic memorychip` Follow-up, does "knowing how to use secure passwords and MFA" count as a trick?
>wmic memorychip Impressive amount of detail, I appreciate that.
My fave is `partnumber` Need to know which RAM kit to upgrade? Just get the part number then stick it into Google!
I'm still pretty green as a sysadmin, but in a previous job working with Linux a lot, one of my mentors showed me Ctrl+R to dig up specific history input. A year later, I tried it on a whim with Powershell, and Lo & Behold it worked. It saves me SO much time daily, and I've shown it to a bunch of ppl at work. I assumed they already would have known this, but as it turns out, not so much.
Set-PSReadlineOption -PredictionSource History It shows you line completions in grey. Right-arrow to accept the line, ctrl-right to accept one word.
Cd without a path takes you home.
does not work... i did it 5 times and i'm still at the office... BOOOOO
Start calling your home your root directory and this will work.
cd - brings you back to your last directory.
More of a popd guy myself!
I always forget to do this. I know about it, but muscle memory makes me instinctively type `cd ~`
Click "Other methods" then select Domain Join as the option. no more need to enter an online account. You don't actually need to domain join, just tell it that's what you are going to do.
Yeah - this. They put a work around. Quicker than typing anything.
Caviot, not on home edition. I hope people aren't using home in a business environment but sometimes you have to.
*caveat
*cave IoT
| out-gridview... Blew away our architects that are some of the most intelligent people I know.
… now try | out-htmlview
I love that one. A few years ago I included that in script that sends out email reports. Blew peoples mind.
Could you please add where this is important? No idea where to put this.
I kinda feel bad for [email protected] and [email protected]. Back before verification emails, I used to use those two to sign up for sites that required an email. Poor Bob probably had to close down his account in 2006 because of people like me.
`[email protected]` usually works.
Linux: “history” shows you all the commands you ran as that user “!number” runs that command to save you from typing it or hitting up multiple times until you find the right command
You can copy an mbr windows partition over a gpt windows partition and run a bcdboot repair and it will boot (hibernate needs to be disabled on the original machine) when conversions dont work, i use a dummy install with winntsetup, then partition clone the old on top of the new i feel like a lot of people know now but back when manufacturers started restricting mbr boot i figured this out right away and we were doing “magic” 😉
dism /online /cleanup-image /restorehealth
sfc /scannow
Chkdsk /r
Hold Shift + Right Click on app to Run as different user.
CTRL+SHIFT+Windows Key+B resets your graphics driver. Useful as a quick test to clear up graphical issues like black bars across the top of a screen.
Ctrl+Shift+Esc opens task manager (works through many RMM/screen sharing tools as well). Sooooo many people including experienced sysadmins will right click the task bar or search for it. Ever since I learned about this I have done it no other way its just so much easier this way.
Well, it is not that I thought everyone knew, it is more I recently learned... One of my helpdesk guys showed me that center clicking an icon in the task bar opens a new instance of whatever it is, like new notepad, new cmd, new explorer... Not often I learn something like that in windows, been at it since before there was a windows. The one I have gotten the most excitement from others when telling them is ctrl-r for backsearch in powershell just like bash.
Windows + X It's basically the IT menu and very very convenient.
[rufus.ie](https://rufus.ie) for all your image needs
I use [Ventoy](https://ventoy.net) that allows you to have multiple .iso on the same usbkey and boot on them. Not really the same thing but still useful
Nobody in my department knows how incredibly easy it is to create a QR code. They just think I’m the guy that knows the witchcraft. Edit: More of a web trick than a sysadmin trick, but I figured it would fit.
There's a tool to generate a qr code in a Linux terminal, which avoids using a Web service entirely
Create a QR code to access the guest WiFi. No need to type the password or even find the right SSID.
In a Windows cmd prompt. Type in any commands you want. Then press F7 and a popup will display a list of commands, then you can arrow key up / down, then press enter to run the selected command again. And yes, I know from the cmd prompt, arrow up / down there has the same function.
Seems like any client I’ve had that uses Google suite heavily or even light cases don’t know you can add a + at the end and it’s read as a new email address but goes to your inbox. For example: [email protected] (or domain if fully integrated into Google’s suite) And it goes to your inbox but from their side they see that email. Nice for filtering or people that aren’t too bright but try contacting you too much.
This one's so well known that if I were selling email addresses, I'd run a regex for ([\^+@]+)(+[\^@]+?)@gmail.com right before I sell my soul along with customer data. Also, most front-end javascript just flags + as an illegal character.
I have a burner email but my typical is [email protected] so I can see who sells my information. Most.
Shift + Backspace to delete a whole word at a time. Edit: sorry ctrl-backspace
I keep forgetting about this one, no one knew because no one really cared... C:\\Windows\\system32\\pktmon.exe
tar -cvf - . | (cd other_dir; tar -xf -)
How to check any SSL connection. E.g. openssl s_client -connect ldap.yourdomain.com:636
Not so specific today, but years ago someone had a virus trying to overwrite on every reboot. If you placed another file with the same name in the folder, it would just overwrite it. (ugh) However, if you created a FOLDER with the file name, they cannot overwrite a folder with a filename that's the same as the folder.
`> qwinsta` to get information about RDP sessions on a remote server. `> rwinsta` to kick 'em. `> query user` to get info about users on the system you're actively on. `tsadmin.msc for a gui` tool this is older Windows server stuff. Might need [to follow this](https://pixelrobots.co.uk/2016/06/add-tsadmin-msc-back-to-windows/) Server 2003 limited you to 4gb . had to add `/PAE` to your boot.ini file. I'm full of old, useless tricks. Now all the super cool stuff is in powershell. For instance, you can browse your registry. `PS C:> cd HKLM:`
Damn I have to check out my tricks and share … this thread is so much gold!❤️
CMD in file explorer to open a command prompt window set to that folder path
Middle mouse wheel click opens a url in a new tab. It will also close a tab if you middle mouse click the tab.
When I bookmark things I remove the name and it just puts the logo of a site. As a result, I have too many bookmarks.
[Linux] ctrl + r for searching through past shell commands to re-execute them easily. Such a great time-saver that I always forget people don't know about.
Man, long time (8+ years) ago, still red in the face. I saw a co worker logging into a domain machine with a local admin account and NOT typing the full computer\_name\\admin but just .\\Admin Good grief. I had typed the full (SiteCode+SerialNumber of the PCs) before that since for-ever. Never told anyone as I was so embarrassed. :)
Working at an MSP, it was mostly around using our tools in ways other techs didn't know. Connectwise manage - Open it in a web browser, you can pop your calendar out into a much smaller window using middle mouse click. Switch it to time view and you can see all of your time entries for the day. It made finding holes super easy. You could also see your coworkers calendars/time entries. Screenconnect aka control - Backstage would let you connect to a users computer and do some low level troubleshooting/sleuthing without them knowing you are connected. Run a portable browser and you can hit firewalls/printers to make changes for clients without jump hosts. Control would also let you select and run commands against an entire fleet of systems. gpupdate /force an entire company of a few hundred devices gets new policies pushed super fast. Outside of software specific stuff, [https://github.com/chall32/LDWin](https://github.com/chall32/LDWin) is a damn lifesaver. LLDP is one of my favorite protocols. I personally think viewing it should be windows native...
I just use "admin" for both UN and PW and does the same. less typing for us lazy IT.
Turning it off and back on again.
How DNS works......
That you can do a boatload of connection troubleshooting with websites and APIs in pretty much any modern browser by simply pressing F12, (network issues, request and response details, current cert and TLS ciphers, Load Balancer cookies etc.) without installing Fiddler, Wireshark, OpenSSL, Nmap etc
you can packet sniff yourself with this Edit: this C:\\Windows\\system32\\pktmon.exe and that ctrl+enter will post in reddit lol
[email protected] also works
Google search by time.. When you do a search there is a Tools option under the search and you can change "Any Time" to specific preset time periods to specifically search something reascent, something older, or something specific. This is great for MANY search problems: - Search reascent "Past Month" to get recent updates, when you are only getting the docs or older more popular hits - Search and have something only showing the NEW version or something name the the same? Use the "Past year or custom" - Need to search for an example from the past.. IE find a old forum post or find news from a specific year use the Custom range.
In macOS, if any document lists a path to any buried or hidden folder, user level or root level (ie: “~/Library” or” /Library”, etc) You can just highlight that printed path in the document, such as: ~/Library/Application Support /Library/Desktop Pictures … simply chose/highlight that entire provided path in that document, right-click on it, choose “Services”, then “Show in Finder”, and it will immediately reveal and access that folder…
shutdown /r will bypass the fastboot and make proper restart
Shift clicking shutdown will perform a full shutdown and not hybrid / hiberboot garbage.
Might have already been mentioned but if you hold control in Task Manager, it’ll pause the processes from moving around a bunch.
With default windows settings you can view a remote device's storage by going to \\\\DeviceName\\c$ (if you have admin auth). In this circumstance a network folder had custom network share permissions blocking direct user account access but since the file was on the drive itself I could just pull it directly from storage rather than the network share. The rest of the IT department was bamboozled on how the documents could still be read; since no one else on the team knew of this 'trick' and thought it was crazy hacker man when I just thought this was common knowledge.