Having puppet run powershell script in ruby

I have a powershell script we are using to create our folders, shares, and there is a register entry for env enablement. My job is to create a ruby script that dos the same so it can be run in puppet. While going over the powershell I notice what was being used in powershell to give us access to some share files. My question being what would be the ruby equivalent in puppet for script portion shown below. or would it be better to create a ruby script in puppet that runs our powershell script.

#Copy Scripts
Copy-Item -Path "X:\Information Technology\DBA\PowerShell_Scripts\ServerSetup\DW\*.*" -Destination "D:\Scripts\DW"

if(!(Get-SBShare -Name SIS -ea 0)){
New-SBShare -Name SIS -Path D:\SIS

Grant-SbShareAccess -Name SIS -AccountName "Admin\SQLAdmins" -AccessRight Full -Force
Grant-SbShareAccess -Name SIS -AccountName "administrators" -AccessRight Full -Force
Revoke-SbShareAccess -Name SIS -AccountName "Everyone" -Force

Leave a Comment