Windows Operating System

From Got Opinion Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Windows Operating System

Windows 10 Notes

PowerShell

I would prefer if Microsoft used BASH instead of PowerShell.

grep the PowerShell way

Concatenate two or more files together using each file name (cat is alias for Get-Content and sc is alias for Set-Content):

cat .\temp00.txt, .\temp01.txt | sc t.txt

Concatenate two or more files using wildcard (be careful using this so your output doesn't match your wildcard case):

cat .\temp*.csv | sc combined.csv

Note Use Set-Content (alias sc) to preserve character encoding instead of > or >>.

HASH in PowerShell

> get-help Get-FileHash

NAME
    Get-FileHash

SYNTAX
    Get-FileHash [-Path] <string[]> [-Algorithm {SHA1 | SHA256 | SHA384 | SHA512 | MACTripleDES | MD5 | RIPEMD160}]
    [<CommonParameters>]

    Get-FileHash -LiteralPath <string[]> [-Algorithm {SHA1 | SHA256 | SHA384 | SHA512 | MACTripleDES | MD5 |
    RIPEMD160}]  [<CommonParameters>]

    Get-FileHash -InputStream <Stream> [-Algorithm {SHA1 | SHA256 | SHA384 | SHA512 | MACTripleDES | MD5 | RIPEMD160}]
     [<CommonParameters>]


ALIASES
    None

Disable SearchApp.exe

Run commands as PowerShell Admin

Temporarily disable SearchApp.exe. I had to run command over and over before it stopped autostarting. I disabled Microsoft Search in the Services window. This did not stop SearchApp.exe so I had to use PowerShell.

PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
SUCCESS: The process "SearchApp.exe" with PID 9644 has been terminated.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
SUCCESS: The process "SearchApp.exe" with PID 9284 has been terminated.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
SUCCESS: The process "SearchApp.exe" with PID 11308 has been terminated.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
ERROR: The process "SearchApp.exe" not found.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
ERROR: The process "SearchApp.exe" not found.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
ERROR: The process "SearchApp.exe" not found.
PS C:\WINDOWS\system32> taskkill /f /im SearchApp.exe
ERROR: The process "SearchApp.exe" not found.

PS C:\WINDOWS\SystemApps> move C:\Windows\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy.old

Lose NVidia Control Panel

Hold the SHIFT key and right mouse click on the taskbar icon. Select the MOVE option and your mouse pointer will move to the hidden windows frame. Click and hold to drag the frame to your active desktop.

Synchronize with external time source

Steps originated from: Configuring the Windows Time Service

Go to registry editor by typing regedit.exe in run box.

Edit:

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type

Change this REG_SZ value from NT5DS to NTP

Edit:

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags

This registry entry controls whether the local computer is marked as a reliable time server (which is only possible if the previous registry entry is set to NTP). Change the decimal REG_DWORD value from 10 to 5 here.

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer

This registry entry specifies a space-delimited list of stratum 1 time servers from which the local computer can obtain reliable time stamps. The list may consist of one or more DNS names or IP addresses (if DNS names are used then you must append ,0x1 to the end of each DNS name). For example, to synchronize the PDC Emulator in your forest root domain with tock.usno.navy.mil, an open-access SNTP time server run by the United States Naval Observatory, change the value of the NtpServer registry entry from time.windows.com,0x1 to tock.usno.navy.mil,0x1 here. Alternatively, you can specify the IP address of this time server, which is 192.5.41.209 instead.

List of open NTP servers USNO NTP NETWORK TIME SERVERS

Now stop and restart the Windows Time service using the following commands:

net stop w32time

net start w32time

It may take an hour or so for the PDC Emulator to fully synchronize with the external time server because of the nature of the polling method W32Time uses. Depending on the latency of your Internet connection, the accuracy of the CMOS clock on your forest root PDC Emulator may be within a second or two of UTC. If you need more accurate time however, you can purchase a hardware time source like an atomic clock and connect it to your PDC emulator.

Alternatively, if you don’t want to wait for time convergence to occur between your stratum 2 time server (your forest root PDC Emulator) and the external stratum 1 time server, you can run the following command on your PDC Emulator:

w32tm /resync /rediscover


Windows Command Line

Windows cmd.exe tips

Windows clustering

Windows Server 2016 Failover Cluster without Active Directory (Workgroup Cluster)

Configuring IP Addresses & Dependencies For Multi-subnet Clusters

Configuring IP Addresses & Dependencies For Multi-subnet Clusters Part II

Configuring IP Addresses & Dependencies For Multi-subnet Clusters Part III

Create Failover Clustered Roles

Windows Miscellaneous Stuff

How to create a Windows service using sc.exe

Troubleshooting

Trouble Connection to Cluster Nodes Check WMI

Storage Spaces Direct

Storage Spaces Direct Overview