Expected Behavior
Import and use the module under a non-privileged PowerShell session
Current Behavior
Requires elevated session because one command has #requires statement
Failure Information
Write-Error: Failed to import private function C:\Modules\RubrikPolaris\M365\New-EnterpriseApplication.ps1: The script 'New-EnterpriseApplication.ps1' cannot be run because it contains a "#requires" statement for running as Administrator. The current PowerShell session is not running as Administrator. Start PowerShell by using the Run as Administrator option, and then try running the script again.
Steps to Reproduce
Open PowerShell 7 session, run import command:
> ipmo C:\Modules\RubrikPolaris\
Write-Error: Failed to import private function C:\Modules\RubrikPolaris\M365\New-EnterpriseApplication.ps1: The script 'New-EnterpriseApplication.ps1' cannot be run because it contains a "#requires" statement for running as Administrator. The current PowerShell session is not running as Administrator. Start PowerShell by using the Run as Administrator option, and then try running the script again.
Expected Behavior Import and use the module under a non-privileged PowerShell session
Current Behavior Requires elevated session because one command has
#requires
statementFailure Information
Steps to Reproduce
Open PowerShell 7 session, run import command:
Context
https://github.com/rubrikinc/polaris-o365-powershell/blob/762189bb2e65eebc706500948a3710686bc67e90/RubrikPolaris/M365/New-EnterpriseApplication.ps1#L1