Hi @Mohammad Falah ,
Thank you for posting in Microsoft Q&A forum.
==>I didn't ask for the powershell script I am asking for the way of deploying the powershell script on all domain devices.
We can deploy the PowerShell script as a package or application.
For package, create an empty package with a program containing the command line of the script to be run from a share, the script is executed using the local system account of the client computer if run with administrative permissions. So the permissions on the share must allow for "Domain computers" to have read access otherwise it cannot access the script.
Then deploy it to your collection.
You can refer to below guide:
Deploying PowerShell Scripts in SCCM: Application Model vs. Legacy Packages vs. Scripts
Thanks for your time. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.