A method of cleaning a hard surface with a cleaning composition, said method comprising the steps of applying the cleaning composition onto a hard surface, wherein the cleaning composition comprises polyalkanolamine polymer obtainable by a process comprising step a), wherein a) condensing at least one component a1), optionally at least one component a2) and/or optionally at least one component a3), which are defined as follows: a1) is at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b), wherein A are independently selected from C 1 -C 6 -alkylene, R 1, R 1∗, R 2, R 2∗, R 3, R 3∗, R 4, R 4∗, R 5, R 5∗ and R 6 are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted, and a2) is at least one compound selected from polyols of formula Y n, wherein n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and a3) is at least one compound selected from polyamines of formula Y'(NHR y) m, wherein m is an integer from 2 to 4, Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and R y has one of the meanings given for R 6 or two radicals R y together may form a C 1 -C 6 -alkylene group, wherein the sum of the amount of components a1), a2) and a3) is more than 70 wt.-% in relation to the sum of the amount of all monomers employed in the condensation according to step a) in order to obtain a polyether having remaining hydroxyl groups and optionally remaining secondary amino groups. a) condensing at least one component a1), optionally at least one component a2) and/or optionally at least one component a3), which are defined as follows: a1) is at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b), wherein A are independently selected from C 1 -C 6 -alkylene, R 1, R 1∗, R 2, R 2∗, R 3, R 3∗, R 4, R 4∗, R 5, R 5∗ and R 6 are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted, and a2) is at least one compound selected from polyols of formula Y n, wherein n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and a3) is at least one compound selected from polyamines of formula Y'(NHR y) m, wherein m is an integer from 2 to 4, Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and R y has one of the meanings given for R 6 or two radicals R y together may form a C 1 -C 6 -alkylene group, wherein the sum of the amount of components a1), a2) and a3) is more than 70 wt.-% in relation to the sum of the amount of all monomers employed in the condensation according to step a) in order to obtain a polyether having remaining hydroxyl groups and optionally remaining secondary amino groups. a1) is at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b), wherein A are independently selected from C 1 -C 6 -alkylene, R 1, R 1∗, R 2, R 2∗, R 3, R 3∗, R 4, R 4∗, R 5, R 5∗ and R 6 are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted, and A are independently selected from C 1 -C 6 -alkylene, R 1, R 1∗, R 2, R 2∗, R 3, R 3∗, R 4, R 4∗, R 5, R 5∗ and R 6 are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted, and a2) is at least one compound selected from polyols of formula Y n, wherein n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and a3) is at least one compound selected from polyamines of formula Y'(NHR y) m, wherein m is an integer from 2 to 4, Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and R y has one of the meanings given for R 6 or two radicals R y together may form a C 1 -C 6 -alkylene group, m is an integer from 2 to 4, Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms, and R y has one of the meanings given for R 6 or two radicals R y together may form a C 1 -C 6 -alkylene group, wherein the sum of the amount of components a1), a2) and a3) is more than 70 wt.-% in relation to the sum of the amount of all monomers employed in the condensation according to step a) in order to obtain a polyether having remaining hydroxyl groups and optionally remaining secondary amino groups.