-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsysAdmin-Windows
307 lines (196 loc) · 10.3 KB
/
sysAdmin-Windows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
0. Some important shorts
Ctrl + Shift + ESC -----> Task Manager // Task Manager can also be used disk storage type like SSD, HDD
1. Ramp up the speed of Windows
- Disable "SysMain" from "Services" // feature that push 3rd party services to run automatically
- Enable "Performance mode" from "System Properties -> Advanced" // might have to turn on "Adjust Clear Text" in some PC.
- Delete "%temp%" directory files // shortkey: Win + R and type --> %temp%
- Delete "temp" directory files // shortkey: Win + R and type --> temp
- Disable unnecessary Startup Apps // Task Manager -> Startup -> Select app & disable
- Changee the power plan to either "Balanced" or "High". // Balanced is usually default setting. So...
- "cleanmgr" from "Run" & select option from "Disk Clean-Up Utility" // Select Cache, Recycle Bin, Temp files, Thumbnails, etc
[Note: Make sure Windows "Local Disk C" have at least 50 GB empty storage.]
2. Enable Printer sharing between PCs + Enable Network Discovery
[In Computer 1]
- Go to "Network and Sharing Center"
or,
- "Internet & Network setting" // by clicking wifi or ethernet icon
- Select "Sharing Options" // which is below "Change adapter Options"
Do this in Private profile: // Its not good idea to share printer "Public" network profile
- Turn on Network Discovery
enable -> "Turn on automatic setup of network connected device"
- Turn on file and printer sharing
- Turn off password protected sharing
- Control Panel -> Hardware & Sound -> Devices and Printers -> Select a Printer -> Select properties -> Sharing
- Click on "Share this printer"
[In Computer 2]
- File Manager -> Network -> Select Computer 1 // Right click on Network and hit Refresh if nothing appears
- Right click on printer -> Connect
[Note: PCs need to be in same network in order to achieve this.]
[Note: Change the network profile from "Public" to "Private". Setting > Network & Internet > Ethernet or Wifi > Private ]
3. File/Folder sharing in same Network (aka, Public Shared Folder ] [aka, Network Drive]
- Create or Select folder which you want to share
- Right click on folder
- Select Properties -> Advance Sharing -> Share this folder -> Apply
-> Permission -> Full Control -> Apply
-> User -> Everyone -> Apply
-> Share -> Everyone -> Add
-> Everyone -> Read/Write -> Share
- Open File Manager
- Select Network
- You should see your Desktop name. Click on it.
- You should see able to see your shared folder.
[If you don't see your Desktop name in Network section from FileManager, enable these 4 services.]
- Services -> SSDP Discovery -> Startup Type -> Automatic [click, start if its not running.]
-> UPNP Device Host -> Startup Type -> Automatic [click, start if its not running.]
-> Function Discovery Provider Host -> Startup Type -> Automatic [click, stop and start.]
-> Function Discovery Resource Publication -> Startup Type -> Automatic
==============================================
4. Reset Local Windows password if forgotten
- Using bootable pendrive open "Command Prompt"
- copy X:\Windows\System32\cmd.exe C:\Windows\System32\sethc.exe
- Reboot
- At login screen, press Shift 5 times // Will open Command Prompt
- net user <old/new-username> <new-password> // Commmand to create new password for given username
- Voila.
[Tested on Windows 10, it worked. Use "quotation mark" if userename have space on it.]
or,
If two user are in same computer, then admin user can change the password:
- net user <username> *
====================================================
5. Backup Chrome extension, because you never know what your Boss says
- Go to extension setting.
- Enable Developer Option.
- Select "Pack Extension" option.
- In "Extension Root Directory", select the folder where is extension exist. // Use "extension ID" to track, using "locate" cmd.
- The end.
To load/install extension locally:
- Select "extension-name/version.crx" file and right-click to open it in chrome.
....> need to verify
[Sometimes we need to backup EVERYTHING.]
6. Restart a service using terminal
restart-service -name <> // E.g.: restart-service -name firefox
[Works in Powershell. Not in "Command Prompt".]
7. Try to fix Windows 10 network issue, when its "connect to WiFi but with no internet"
netsh winsock reset ---->
netsh int ip reset ---->
ipconfig /release ---->
ipconfig /renew --->
[For PowerShell users]
Get-NetIPAddress // similar to "ipconfig", but much cleaner
8. Give Admin access to a user
net localgroup administrators <user-name> /add
example: net localgroup administrators Ashish /add
[Don't give admin access to everyone. For security reason.]
9. Show password, wifi names from terminal
netsh wlan show profile // list all WiFi names
netsh wlan show profile = "wifi-name" key = clear // select wifi name and show its password
netsh wlan show profile = "wifi-name" | findstr Key // show the password only of selected wifi name
[ Quotation mark for WiFi name is Optional.]
10. Troubleshoot boot issues
Part I:
chkdsk /r // r = repair
DISM /Online /Cleanup-Image /ScanHealth // DISM = Deployment Image Servicing and Management
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow // SFC = System File Checker
Part II:
bootrec /ScanOS
bootrec /FixMbr
bootrec /FixBoot
bootrec /RebuildBcd
[ To use DISM command is used with "/Online" parameter, you need internet connection.]
11. Launch the "Advance Startup Repair"
- Hold shift key
- Select "Restart" option from Lock Screen.
[There are other ways to trigger ASR if login screen doesn't show up.]
12. Install packages/software through Terminal/CMD
- winget install <vlc>
- choco install <vlc>
[ One must configure "choco" in order to use.]
13. Fix a font issue in MS Word where MS Office ignore Nepali symbols ु ू
MS Word -> Settings -> Proofing -> Auto-correct Options -> Autoformat As You Type -> Uncheck "Straight quotes"
[verify if there are other issues, related to "proofing".]
14. Shutdown Windows using shortkey
Alt + F4
[A dialog box appear where you can select Restart or Shutdown]
15. Activate Windows & Office package for testing:
irm https:// get . activated . win | iex //remove space
[Use PowerShell or Terminal, not CMD.]
16. Create an invisible folder in Windows [ Trick ]
- create a folder named "con" & press Alt + 255 // like: "con alt+255"
- change the folder icon to invisible icon
[con is one of the restricted word which users can't use to create the folder in Windows.]
[Also: Folder is selected, and is visible when the move the mouse over to it. So its not "truely invisible".]
17. Force Windows to open "Recovery Environment" to solve Boot issues:
- Power On the laptop.
- Before Windows attempts to load (spinning dots):
- Press Power buttom for 5-10 sec for Hard Shutdown
- Do this twice
- In 3rd time, Windows will open "Recovery Environment"
18. Get all Windows user info
get-localuser
19. Create a new user in Windows
net user pranav * /add
or,
net user pranav #007#007 /add /logonpasswordchg:yes // create a new user with temporary password which need to change later
["pranav" is username and "#007#007" is the password.]
20. Delete the user profile in Windows
net user pranav /del // will delete Windows user named "pranav"
or
remove-localuser pranav
[Note: If you want GUI to create and manage user, than go to Computer Management -> Local User and Groups -> Users ]
21. Force/Let Windows user to change their password when they log on:
net user pranav /logonpasswordchg:yes //Privacy. Admin shouldn't know his emplyooees passwords.
[helpfull for new employee to create his own user password after setting up his/her PC]
22. Create a password for Windows user
net user pranav * //3rd person won't be above to see what you have typed
or
net user pranav 'write-password-here' //3rd person can be able to see what you have typed
[first method is more cool]
23. Get information about running service using "Get-Service"
Get-Service wuauserv //show windows update service
Get-Service usauserv | Format-List * //see in more detailed way
Stop-Service wuauserv //Stop running service
Start-Service wsauserv
[Run "Get-Service" to see all services that are running or stopped.]
[Also there is a GUI system app named "Services" that do same thing.]
24. How to check for disk corruption?
wmic
diskdrive get status // if output is ok, then it should be fine. Else:
exit
chkdisk
[We can also use SFC command ask mentioned above]
25. See bootable pendrive state in Live Windows Troubleshooting mode // shift + Restart --> Advance Troubleshooting
list disk
sel disk
detail disk
[Normally "boot disk" category need to be "yes" in order for pendrive to work (i.e. for installing Windows 10)]
26. Turn off MS Word/PPT preview:
General -> Uncheck "Enable Live Preview"
or
Enable -> Always show icons, never thumbnails // Open File Explorer Options
[Affected in Windows 10. ]
27. How to check Memory (RAM) related issue in Windows 10?
- Launch "Windows Memory Diagnostic Tool" // Also check "system summary" from Event Viewer.
[There are other tool like: memtest. We can also use BIOS setting to run diagnotic.]
28. Stop printer queue in Windows 10
- Delete all files from:
C:\Windows\System32\spool\PRINTERS
- Go to "Services" -> Stop "Printer Spooler".
[Restart the "printer spooler" again later when things are back to normal.]
29. Remove Copilot bloatware in Windows 10/11
- Run PowerShell as Administrator
- Paste:
Get-AppxPackage *CoPilot* -AllUsers | Remove-AppPackage -AllUsers
- Press Enter (There will not be any output if it is successfully removed)
- Reboot
[Remove it: For privacy reason. And to save RAM since it run most of the time on background.]
30. Debloat Windows completly.
- Run Powershell or Terminal with Adminstrative privileges
irm "https://christitus.com/win" | iex
[Give you option to remove: Copilot, MS Edge, etc. Also give you install option for software like: Firefox, PDF reader.]
31. Share files between Windows and Linux over same network.
- Install WinSCP // Avilable in Windows. For Linux, install "Filezilla".
- Add site // Using SFTP, IP, username and password of another OS
- Save session // For future, if you don't want to re-login
[ Now you will have two window (with Guest OS and Host OS) for sharing the files using TUI session.]
32.