How to set Datasource security for the root / top folder ?


I need to change 250+ datasource parameters for the security of the root folder.

Manually, I go to pw administrator, select my project/datasource, right-click Properties, then edit 'folder security' and 'document security'

Can i do it with powershell ?

I know Update-PWFolderSecurity but it seems to be for subfolders

Is it with Set-PWDatasourceSetting  ? Does some know the options for document security and folder security ?