I am from UNIX/Linux/HP-UX/AIX/SunOS/CYGWIN_NT ERP including SAP/openssl/openssl.exe/gdb.exe/dbx/gdb idoc files at ERP.
we can do this using bash to execute powershell at windows.
I have done using cygwin at localhost (linux oriented) and calling powershell.exe
$ /usr/bin/cat.exe ./sample.ps1
Write-Host "sample search:"
Write-Host "murugesan openssl"
Get-Acl "C:" | Select-Object -ExpandProperty Access
$ /usr/bin/cat.exe ./call-powershell.sh
#!/bin/mksh.exe
if [[ -f sample.ps1 ]]
then
if [[ -f /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ]]
then
/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe sample.ps1 2>&1 |\
/usr/bin/tr.exe -d "\r" 2>&1 |\
/usr/bin/grep.exe -E "AccessControlType"
else
echo Update this script to have valid path for powershell.exe
fi
```else
```sql
echo Update this script to have valid path for existing file sample.ps1
```fi
sample output:
$ ./call-powershell.sh
murugesan openssl
AccessControlType : Allow
AccessControlType : Allow
AccessControlType : Allow
AccessControlType : Allow
AccessControlType : Allow
Using remote login from other host we can execute the remote shell script across any platforms using related authorized_keys at required OS.