Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:21:81

And to Solomon ˹We subjected˺ the wind, blowing forcefully, proceeding by his command toward the land which We had blessed. And We are ever, of all things, Knowing.  

And, We disposed, for Solomon the wind to blow strongly — in another verse it is ˹described as being˺ rukhā’an, ‘to blow softly’ ˹Q. 38:36˺; in other words, ˹it is either˺ blowing violently or gently ˹respectively˺, according to what he ˹Solomon˺ wanted — making its way, at his command, to the land which We have blessed, namely, Syria; and We have knowledge of all things, among them the fact that God, exalted be He, knew that what He gave to Solomon would prompt him to be subservient to his Lord, and so God did this in accordance with His knowledge.
القرآن:٢١:٨١

وَلِسُلَيْمَانَ الرِّيحَ عَاصِفَةً تَجْرِي بِأَمْرِهِ إِلَى الْأَرْضِ الَّتِي بَارَكْنَا فِيهَا ۚ وَكُنَّا بِكُلِّ شَيْءٍ عَالِمِينَ  

{و} سخرنا {لسليمان الريح عاصفة} وفي آية أخرى: رخاء، أي شديدة الهبوب وخفيفته حسب إرادته {تجري بأمره إلى الأرض التي باركنا فيها} وهي الشام {وكنا بكل شيء عالمين} من ذلك علم الله تعالى بأن ما يعطيه سليمان يدعوه إلى الخضوع لربه ففعله تعالى على مقتضى علمه.