Check Drive Performance
winsat disk -drive c
Check Drive Fragmentation
defrag c: /a
Show Last Boot Time
wmic os get lastbootuptime
Move Auskey to a new computer
Copy the contents of: C:\Users\USERNAME\AppData\Roaming\AUSkey folder to the new computer (2 x keystore files)
Rename Computer
WMIC ComputerSystem where Name=”SYD-LT01″ call Rename Name=”SYD-LT01A”
Command Line – New User
net user /add NewUser Password
Command Line – Add User to Administrators Group
net localgroup administrators NewUser /add
Enable file and printer sharing
netsh advfirewall firewall set rule name=”File and Printer Sharing (SMB-In)” dir=in profile=domain new enable=Yes
Allow a port through firewall – All Profiles
netsh advfirewall firewall add rule name=”NAME” dir=in action=allow protocol=TCP localport=600
Quick Share Via Command Prompt
net share sharename=c:\Users
net share sharename /delete
Grant User access to files and folders – icacls “c:\Users” /grant ladmin:(OI)(CI)F /T
Enable Remote Management Firewall Rules
netsh advfirewall firewall set rule group=”Windows Management Instrumentation (WMI)” new enable=yes
netsh advfirewall firewall set rule group=”Remote Event Log Management” new enable=yes
Kickstart ARD
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
Clear Event Logs on Windows
wevtutil cl Application
wevtutil cl Security
wevtutil cl Setup
wevtutil cl System
Repair Windows Update
https://support.microsoft.com/en-us/help/10164/fix-windows-update-errors
Delete all files with a particular extension on C Drive
del /S /Q C:\*.crab
Delete a directory and all files in it
rmdir /S nonemptydir
Clear Software Distribution Folder
Stop the BITS service, the Windows Update service, and the Cryptographic service. To do this, at a command prompt, type the following commands. Make sure that you press Enter after you type each command.
- net stop bits
net stop wuauserv
- net stop appidsvc
- net stop cryptsvc
- Rename the software distribution folders backup copies. To do this, at a command prompt, type the following commands. Make sure that you press Enter after you type each command.
- Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
- Ren %systemroot%\system32\catroot2 catroot2.bak
- Restart the BITS service, the Windows Update service, and the Cryptographic service. To do this, at a command prompt, type the following commands. Make sure that you press Enter after you type each command.
net start bits
- net start wuauserv
- net start appidsvc
- net start cryptsvc
5. Restart your PC and check if it works this time when you try to update.
Apple Software Update from Command Line without Reboot
softwareupdate -i -a
Change Sleep Settings on Mac – Command line
pmset -c disksleep 0
pmset -c displaysleep 10
pmset -c womp 1
pmset -c sleep 0
pmset -c powernap 1
https://www.dssw.co.uk/reference/pmset.html
Disable Sleep – Windows for Current Power Scheme
https://4it.com.au/kb/wp-admin/post.php?post=934&action=edit
Command to Check Hard Drive Free Space
wmic logicaldisk get size,freespace,caption
Command to show Wifi Network currently connected to
Netsh WLAN show interfaces
Time Commands
NET TIME (Check the time)
NET TIME \\NAME-SVR /SET /Y (Set the Time Server – Name or IP Address)
W32tm /resync (Sync the time)
Delete One Drive Name Space
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{guid}