Summary
Main reason was that the NTFSSecurity module was not installed on the Studio/RAS Machine.
Question
While it isn't consistent, a PowerShell Script operation in a flow that uses a module input doesn't want to run - receive an Access Denied. The module in question is the NTFSSecurity module.
Answer
Main reason was that the NTFSSecurity module was not installed on the Studio/RAS Machine.
here are the steps:
1. Download NTFSSecurity module from here https://gallery.technet.microsoft.com/scriptcenter/1abd77a5-9c0b-4a2b-acef-90dbb2b84e85 and install(see installation instructions on the page) on the RAS at this location:
C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Modules
2. Unlock the module by executing this command from powershell as admin:
gci "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Modules\\NTFSSecurity"
Unblock-File