Turn off the power to the ice machine and shut off the water supply valve. Locate the water inlet valve, which is typically located on the back of the ice machine. It should be connected to the water supply line. Disconnect the water supply line from the valve using a wrench. Have a bucket or towel ready to catch any water that may spill out. Remove the screws or bolts that secure the valve to the ice machine using a screwdriver or wrench, depending on the type of fasteners used. Carefully remove the valve from the ice machine, taking note of any wires or connections that need to be disconnected. Disconnect any wires or connections as necessary, making sure to label them for reassembly. Install the new water inlet valve, making sure to connect any wires or connections as necessary. Secure the new valve to the ice machine using the screws or bolts. Reconnect the water supply line to the valve and tighten it with a wrench. Turn on the water supply valve and check for leaks. Turn on the power to the ice machine and test its operation.