#!/bin/sh /usr/bin/ssh fredw@nrb-shares01 'powershell.exe -command "& {Get-SmbOpenFile} | ConvertTo-Csv -notype | out-file -encoding UTF8 -filepath files.csv"' /usr/bin/scp fredw@nrb-shares01:files.csv /tmp/files.csv /usr/bin/ssh fredw@nrb-dc01 'powershell.exe -command "Get-DHCPServerv4scope | Get-DHCPServerv4Lease | ConvertTo-CSV -notype | out-file -encoding UTF8 -filepath dhcp.csv"' /usr/bin/scp fredw@nrb-dc01:dhcp.csv /tmp/dhcp.csv cd /root/.venv/openfiles && direnv exec . python fileCsv2Json.py >/dev/null 2>&1