Short answer
Simply speaking this hadith is well known (one could say it is common knowledge), but when one starts checking the narrator chain one finds out it has flaws. Nevertheless seeking knowledge is regarded as essential for every Muslim. Scholars even defined a minimum of required knowledge which depends on the activities of a person, be it the essential knowledge of our daily duties such as prayers, worship in general passing by fasts, zakat, hajj or depending on our work like knowledge about the halal and haram in context of our work and business like to what extent mixing of genders is allowed, what kinds of business contracts are allowed etc..
Back to our hadith all the different chains which seem most to be narrated on the authority of Anas ibn Malik lead scholars such as: al-Muzzi, az-Zarkashi, as-Suyuti, as-Sakhawi, a-Dhahabi, al-Manawi, az-Zurqani and al-Albani to consider it at least as hassan due to the mass of paths and witnessing narrations or parts of ahadith. Al-Albani even quoted it in his Sahih Sunan ibn Majah.
And those who considered it as weak like imam Ahmad and Ishaaq ibn Rahawayh and ibn 'Abd al-Barr mainly have an issue with the narrator chains, while they agree to the content. As stated in Fatwa islamqa #95897 -in Arabic-. Note that Allah says in the qur'an:
… "My Lord, increase me in knowledge." (20:114)
Which actually support the meaning.
Another useful reference is this thread in Arabic which quotes and discusses sources and more details for all the narrations and would add those on the authority of sahaba such as ibn Masu'd, ibn 'Omar, ibn 'Abbaas, 'Ali, Al-Hussain ibn 'Ali and abu Sa'id al-Khudry etc. to my main source.
Some clarification
Before quoting and translating from a source I'd like to point once again at the fact that imam al-Bayhaqi lived between 384 A.H. and 458 A.H. so he can't have been quoted by imam at-Tirmidhi (the author of al-Jami' al-Mukhtassar and a-Shamail) who was born 209 A.H. and died around 279 A.H. nor by al-Hakim at-Tirmidhi who died 320 A.H. according to Arabic Wikipedia see here. So either there's one more unknown scholar from Termez or there's a mistake or confusion on who actually has quoted al-Bayhaqi.
Secondly I'd like to point at the fact that my answer mainly is restricted on the first part of the hadith:
"Seeking knowledge is a duty upon every Muslim"... (Sunan ibn Majah)
as discussing the rest of the statement may require additional sources, at least none of the statements I was able to find clearly says that it addresses the whole text as can be found in Sunan ibn Majah. Also note that "Muslim" includes male and female as scholars say. So any narration quoting both would be redundant and can therefore hardly be considered as the words of our prophet ().
Discussion of the ahadith in al-Maqassid al-Hassanah
Imam as-Sakhawi quoted what we may call the quintessence of the scholarly discussions about the above hadith quote in his book al-Maqassid al-Hassanah fi bayani kathirin min al-Ahadith al-Mushtaharah 'ala al-Alssinah المقاصد الحسنة في بيان كثير من الأحاديث المشتهرة على الألسنة (The good intentions in clarifying many of the ahadith that got famous and narrated by tongues) -see here or here in Arabic-:
Note that in the following I'm translating from Arabic and as these translations are mine take them with the necessary care (you may also find some additions or comments in italic)
(حديث مرفوع) : " طَلَبُ الْعِلْمِ فَرِيضَةٌ عَلَى كُلِّ مُسْلِمٍ " ، ابن ماجه في سننه ، وابن عبد البر في العلم له من حديث حفص بن سليمان عن كثير بن شِنْظِير ، عن محمد بن سيرين عن أنس به مرفوعا بزيادة : وواضع العلم عند غير أهله كمقلد الخنازير الجوهر واللؤلؤ والذهب ، وحفص ضعيف جدا ، بل اتهمه بعضهم بالكذب والوضع ،
(Hadith marfo'): "Seeking knowledge is a duty upon every Muslim" compiled by ibn Majah in his Sunan, ibn 'Abd al-Barr in his al-'Ilm from the hadith of Hafs ibn Sulayman (1) from Kathir ibn Shindhyr from Muhammad ibn Siryn from Anas with the addition: "and he who imparts knowledge to those who do not deserve it, is like one who puts a necklace of jewels, pearls and gold around the neck of swines." and Hafs is very weak, some even accused him being a liar and fabricator.
وقيل عن أحمد : : إنه صالح ، ولكن له شاهد عند ابن شاهين في الأفراد ، ورويناه في ثاني السمعيات من حديث موسى بن داود ، حدثنا حماد بن سلمة عن قتادة عن أنس به ،
And it was stated that Ahmad said: He is fine, but he has a witnessing backup in ibn Shaheens al-Afrad (2) and we have narrated it in the second of our hearings from the hadith of Musa ibn Dawod, we were informed from Hammad ibn Salamh from Qatadah from Anas with the statement.
وقال ابن شاهين : إنه غريب ، قلت : ورجاله ثقات ، بل يروى عن نحو عشرين تابعيا عن أنس كإبراهيم النخعي وإسحاق بن عبد اللَّه بن أبي طلحة ، وثابت وله عنه طرق ، وحميد والزبير بن الحريت وزياد بن ميمون أبي عمار أو ابن عمار وسلام الطويل وطريف بن سليمان أبي عاتكة ، وقتادة والمثنى بن دينار ، ومحمد بن مسلم الزهري ، ومسلم الأعور ، كلهم عن أنس
Ibn Shaheen said: It is strange (ghareeb). I say: the narrators are trustworthy, in fact it was narrated by about twenty from among the followers (tabi'yn) from Anas like Ibrahim an-Nakha'i, Ishaaq ibn 'Abdullah ibn abi Talha, Thabit via different paths, Humaid and az-Zubayr ibn al-Hurayth, Ziyad ibn Maymoon abi 'Ammar ir ibn 'Ammar, Salim at-Taweel, Turaif ibn Sulayman abi 'Atikah, Qatadah, al-Muthanna ibn Dinar, Muhammad ibn Muslim az-Zuhri, Muslim al-'A'war all of this from Anas.
ولفظ حميد : طلب الفقه محتم واجب على كل مسلم ، ولزياد من الزيادة : واللَّه يحب إغائة اللهفان ، ولأبي عاتكة في أوله : اطلبوا العلم ولو بالصين ، وفي كل منها مقال ، ولذا قال ابن عبد البر : إنه يروى عن أنس من وجوه كثيرة ، كلها معلولة لا حجة في شيء منها عند أهل العلم بالحديث من جهة الإسناد ،
And the wording of Humaid is: "Seeking knowledge is fatal and a duty upon every Muslim" and Ziyad has the following addition: "and Allah loves aiding a yearning one", while ibn 'Atikah says in the beginning: "Seek knowledge even as far as China" and each of it can be discussed at length. Therefore ibn 'Abd al-Barr said: " It is narrated from Anas by many paths, all of them has some defect none of this can be considered as a proof by itself by the people of knowledge from among the scholars of hadith of narrator chains (isnaad).
وقال البزار : إنه روي عن أنس بأسانيد واهية ، قال : وأحسنها ما رواه إبراهيم بن سلام عن حماد بن أبي سليمان عن إبراهيم النخعي عن أنس به مرفوعا . قال : ولا نعلم أسند النخعي عن أنس سواه ، وإبراهيم بن سلام لا نعلم روى عنه إلا أبو عاصم ، وهو عند البيهقي في الشعب ، وابن عبد البر في العلم ، وتمام في فوائده من طريق عبد القدوس بن حبيب الدمشقي الوحاظي ، عن حماد ،
Al-Bazzar said: it was narrated from Anas by thin (weak/doubtful) narrator chains. And he added: the best of it is what was narrated by Ibrahim ibn Salam from Hammad ibn Sulayman from Ibrahim ab-Nakha'i from Anas as marfo' (hadith). He furtehr said: And we don't know if an-Nakah'i narrated any other (hadith) from Anas. As for Ibrahim ibn Salam we don't know anyother who narrated from him except with abu 'Assim. And this can be found in al-Bayhaqi's Shu'ab, in ibn 'Abd al-Barr's al-'Ilm , in Tammam's Fawaid via 'Abd al-Qudus ibn Habib ad-Dimashqi al-Wahaadhy from Hammad.
وأما أبو بكر ابن أبي داود السجستاني فإنه أورده عن جعفر بن مسافر النفيسي حدثنا يحيى بن حسان عن سليمان بن قَرْم ، عن ثابت البناني عن أنس به وقال : سمعت أبي يقول : ليس فيه أصح من هذا ، وكذا رواه ابن عبد البر من جهة جعفر ،
While abu Bakr ibn abi Dawod as-Sijistani has narrated it from Ja'afar ibn Musafir an-Nafisy we were informed from Yahya ibn Hassan from Sulyaman ibn Qarm from Thabit al-Bunani from Anas with it and he said: I heard my father saying: there's no better (sane) narrator chain than this and ibn 'Abd al-Barr narrated it the same way from Ja'afar.
بل وفي الباب عن أبي وجابر وحذيفة والحسين بن علي وسلمان وسمرة وابن عباس وابن عمر وابن مسعود وعلي ومعاوية بن حيدة ونبيط بن شريط وأبي سعيد وأبي هريرة وأم المؤمنين عائشة ، وعائشة ابنة قدامة ، وأم هانئ ، وآخرين ، وبسط الكلام في تخريجها العراقي في تخريجه الكبير للإحياء ،
In fact there are on the same topic narrations from Ubay, Jabir, Hudaifah, al-Hussain ibn 'Ali, Salman, Samurah, ibn 'Abbas, ibn 'Omar, ibn Mas'ud, 'Ali, Moa'wiyah ibn Haidah, Nubayt ibn Sharyt, abu Sa'id, abu Hurrairah, the mother of believers 'Aishah, 'Aishah ibn Qudamah, Umm Hani' and others.
Al'Iraqi made details on the takhreej (3) of these narrations in his big takhreej on al-Ihya' (of imam abu Hamid al-Ghazaly).
ومع هذا كله قال البيهقي : متنه مشهور ، وإسناده ضعيف ، وقد روي من أوجه كلها ضعيفة ، وسبقه الإمام أحمد فيما حكاه ابن الجوزي في العلل المتناهية عنه فقال : إنه لم يثبت عندنا في هذا الباب شيء ،
In spite of everything al-Bayhaqi said: This is a hadith the text of which is quite well known but the chain of transmission is weak. And it was narrated via (*many) chains which are all weak. Imam Ahmad preceeded him in this conclusion as was mentioned by ibn al-Jawzi in his al-'ilal al-Mutanahiyah where he said: There's no (chain) that has been considered as trustworthy by us concerning this topic.
وكذا قال إسحاق بن راهويه : إنه لم يصح ، أما معناه فصحيح في الوضوء والصلاة والزكاة إن كان له مال ، وكذا الحج وغيره ، وتبعه ابن عبد البر بزيادة إيضاح وبيان ، وقال أبو علي النيسابوري الحافظ : إنه لم يصح عن النبي صلى اللَّه عليه وسلم فيه إسناد ، ومثل به ابن الصلاح للمشهور الذي ليس بصحيح وتبع في ذلك أيضا الحاكم ،
The same was quoted by Ishaaq ibn Rahawayh who said: It isn't sahih, but the meaning is sahih when it comes to wudu', salat, zakat if a person has wealth and in hajj etc.. Ibn 'Abd al-Barr continued by additional explanation and clarification. Abu 'Ali from Nishapur the hafidh said: There's no isnad of this hadith that is sahih in its attribution to the prophet Allahs prayers and blessings be upon him. Ibn Salah took this hadith as an example for a well known hadith (mashhur) which is not sahih and followed al-Hakim in this.
ولكن قال العراقي : قد صحح بعض الأئمة بعض طرقه كما بينته في تخريج الإحياء ، وقال المزي : إن طرقه تبلغ به رتبة الحسن ، وقال غيره : أجودها طريق قتادة وثابت كلاهما عن أنس ، وطريق مجاهد عن ابن عمر ، وقال ابن القطان صاحب ابن ماجه في كتاب العلل عقب إيراده له من جهة سلام الطويل عن أنس : إنه غريب حسن الإسناد ،
Nevertheless al-'Iraqi said: some of the imams (scholars) have conisdered some of its paths as sane (sahih) as I've shown in my takhreej of al-'Ihya'. Al-Muzzi said: its (amount of) paths makes it reach the level of hassan. Others said: The best of it are those of Qatadah and Thabit both from Anas, and that of Mujahid from ibn 'Omar. Ibn al-Qattan the companion (and student) of ibn Majah said in his book al-'Ilal (the defects) after quoting it via Salim at-Tawil from Anas: this is ghareeb (strange) with a good (hassan) isnaad.
وقال البيهقي في المدخل : أراد - واللَّه أعلم - العلم العام الذي لا يسع البالغ العاقل جهله أو علم ما يطرأ له خاصة ، أو أراد أنه فريضة على كل مسلم حتى يقوم به من فيه الكفاية ، ثم أخرج عن ابن المبارك أنه سئل عن تفسيره فقال : ليس هذا الذي تظنون ، إنما طلب العلم فريضة أن يقع الرجل في شيء من أمر دينه فيسأل عنه حتى يعلمه .
Al-Bayhaqi said in al-Madkhal: He meant -and Allah knows best- the general knowledge that a mature and mindful person is not allowed to ignore or the knowledge of what occurs to him specifically. Or he meant it is a duty on each Muslim until an essential part that fulfils the necessity (kifayh) reaches knowledge about it. Then he quoted from ibn al-Mubarak that he was asked about its interpretation and he answered: It is not as you think, but seeking knowledge is a duty for a person who was befallen by an issue in his religion and asks until he gets knowledge about it.
تنبيه : قد ألحق بعض المصنفين بآخر هذا الحديث " ومسلمة " وليس لها ذكر في شيء من طرقه وإن كان معناها صحيحا . واستوعب شقيقنا أبو الفيض طرقه في جزء " المسهم في طرق حديث طلب العلم فريضة على كل مسلم " وحكم بصحته .
Warning: some of the authors added at the end of this hadith "and Muslimah" and this addition can't be found in any of its paths even if the meaning is correct. Our brother abu al-Fayd has compiled all its path in a Juz' (small book entitled) "Al-Mushim fi turuqi hadith talab al-Ilmi faridatun 'ala kulli muslim" and he qualified it as sahih.
(1) There's a lot of confusion among scholars about this individual when we leave the hadith sciences. As some use statements of hadith scholars against Hafs the rawy of Qur'an -who has the same name- which riwaya actually is the most prevalent in the Muslim world to show that this man was unreliable and upstart whom without the protection of 'Asim (his mother's later husband) would be an unknown in the matter of qira'at (which actually was the case until the rise of the 'Othman empire).
(2) This seems to refer to a book on ahaad narrations.
(3) Takhreej تخريج or takhryj refers to what we may call a reference list of sources which cover the hadith or hadith statements with as much as details as possible (wording, different sahabah who narrated the same or similar hadith etc.)
The linked fatwa from islamqa contains more quotes of scholars, but I guess the above should be sufficient to clarify the matter.