Access rights powershell script
See original GitHub issueWhen using the compile option for Clang PowerTools i get the below error in my visual studio output window.
. : File D:\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running script
s is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?Lin
kID=135170.
At line:1 char:3
+ . 'D:\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
When looking at ScriptConstants.cs you call powershell with the following syntax:
@"PowerShell.exe -ExecutionPolicy Bypass -NoProfile -Noninteractive -command '&";
The given error suggests that Bypass is actually not activated and that my profile is still loaded?
PowerShellWrapper is using kPowerShellPath and in that case the above parameters are not supplied. Hence, i think PowerShellWrapper should alsoapply the above arguments?
Note: even though i get these errors the compilation continues, hence its not a showstopper.
I am on windows 10, VS2017 with version 4.5.0 of your plugin and visual studio started as administrator.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Add-MailboxFolderPermission (ExchangePowerShell)
The AccessRights parameter specifies the permissions that you want to add for the user on the mailbox folder. You can specify individual folder...
Read more >How to Use PowerShell to Manage Folder Permissions
PowerShell is able to quickly create, modify, and delete file and folder permissions within the Windows NTFS file system. Many system ...
Read more >How to set permissions to run PowerShell Scripts?
How to set permissions to run PowerShell Scripts? Category: Tutorials > Operating Systems > MS Windows > Administration. Select Language ...
Read more >Set and Check User Rights Assignment via Powershell
You can add, remove, and check User Rights Assignment (remotely / locally) with the following Powershell scripts.
Read more >How to Export Folder Permissions to Excel or CSV File
With the help of a PowerShell script, you can export folder permissions to a CSV file and open it in Excel, so you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Everything you said in your hint is already mentioned in the
Arguments
section of theProcess.StartInfo
. Currently we are searching for another way to run thePowerShell script
. ChrisGuzak created another issue for this (#506) where he mentioned a possible problem. We will investigate it and a fix will be ready soon.How this is a duplicate issue I will close it now. You can follow the evolution of it here: https://github.com/Caphyon/clang-power-tools/issues/506.
Thank you for taking the time and helping us make a better product.