Category: Windows

PowerShell checking file hash

PowerShell has a function Get-FileHash to compute the hash value for a file by using a specified hash algorithm. For example, to calculate SHA1 hash code for a file: Get-FileHash -Path "D:\Software\test.ovf" -Algorithm SHA1 You can also check other algorithms like MD5, SHA256 etc. PS D:\Software> Get-Command Get-FileHash CommandType Name Version Source ----------- ---- ------- … Continue reading PowerShell checking file hash

Advertisement

Return IP from a specific NIC (Network Binding Order) for Windows Server 2016 and above

For some applications it is important to see and bind to a correct IP when there are multiple NICs (hence multiple IPs assigned) on a Windows server. For example, if a server has two NICs with two different IPs from 2 subnets, one for public traffic and another for the storage network. You may want … Continue reading Return IP from a specific NIC (Network Binding Order) for Windows Server 2016 and above

Windows turning off network discovery or file and printer sharing activate Public profile for the firewall

I have built a small lab with 2 Windows 2012 VMs from the same template. To simulate another environment, I've shared some folders out from VM1 so that both VMs can access them. However I noticed that VM2 cannot access them with the error code: 0x80070035 -- The network path was not found. As a … Continue reading Windows turning off network discovery or file and printer sharing activate Public profile for the firewall

Configure a Windows server as a NTP client

For years, I have been using the instructions similar to the Microsoft article to configure Windows 2012 servers as NTP client. Basically as a local Windows administrator, modify Windows registry settings. I put all settings into a plain text file as below and import the file. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config] "MaxPosPhaseCorrection"=dword:0002a300 "AnnounceFlags"=dword:00000005 "MaxNegPhaseCorrection"=dword:0002a300 … Continue reading Configure a Windows server as a NTP client

SMB(CIFS) does not show all files when mounting a Windows share

I've been mounting Windows Shares on Linux servers for years and until recently I've noticed an issue with this -- Some files/directories are not listed from a Windows share. I've searching the internet and people are experiencing the same problem as well. It looks like a kernel bug for SMBv2+ according to the discussions below: … Continue reading SMB(CIFS) does not show all files when mounting a Windows share

Getting version information from Windows MSI installer

For a large orgnization, it's common to push a software to clients for auto installation and update. Usually the process needs to know the version information of a software installation package (on Windows it is likely a MSI file) to compare to what has been installed on client machines. Getting the version information is crucial … Continue reading Getting version information from Windows MSI installer