Symptoms:
In the ComplianceReader or System Tasks logging, we note error messages being thrown by our Microsoft 365 / Office 365 (Deprecated) / Microsoft Azure / Amazon Web Services / Salesforce Adapter - this always fails at a particular stage, mentioned in our System Tasks or Compliance Reader logs as 'Failed to execute reader x'
Diagnosis:
Validate that the Pre-Requisites for Powershell inventory gathering are in order - there are additional requirements for the individual Powershell Adapter components, as outlined within the 'System Requirements and Compatibility ' > 'Pre-Requisite Software' section of the docs.flexera.com page for your FlexNet Manager Suite version
Within the importer.log in your ProgramData\Flexera Software\Compliance\Logging\ComplianceReader folder, or accessible from the Download Logs button of your System Tasks page, you should note the name of the stage your Powershell Adapter is failing on, for example:
"Failed to execute Reader 'Get Azure VM Instances' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\microsoft azure\Instance.xml"
The Reader 'Get Azure VM Instances' corresponds to a Method within our Powershell Adapter's logic.ps1 file - located with our instance.xml in Reader\Microsoft Azure\
If we open our instance.xml, we can see the 'Get Azure VM Instances' Reader stage corresponds to Invoke-GetAzureInstanceData :
<Reader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="SourceToObject" Name="Get Azure VM Instances" Order="110" Retries="1" Language="PowerShell" Method="Invoke-GetAzureInstanceData"
Having identified which method is being run here, we can run the AzureRm (The Azure Resource Manager Module, which the Azure Powershell Adapter utilises) commands this method calls from an Administrator Powershell Command Prompt - for the GetAzureInstanceData stage for example:
- Connect-AzureRmAccount -Credential <credential> -TenantID <tenantid> -ServicePrincipal -Scope 0 -ErrorAction Stop
- This should confirm that your current Powershell session has connected with the relevant Azure Account using the specified tenant, application and secret
- <Credential> is a System.Management.Automation.PSCredential object, which should be supplied with our application ID (supplied as a string) and secret key - specified as a securestring - these should both be established within the Beacon UI for this connection
- <TenantID> is the Tenant ID, supplied as a string, and again should be established within the Beacon UI when this connection was initially configured
- -ServicePrincipal switch should establish we're connecting with a ServicePrincipal account
- Scope 0 establishes that only this Powershell session should use the AzureRM account connection we're testing with
- ErrorAction establishes whether we should attempt to continue to connect when confronted with an error
- For more details on this function in particular, note the Microsoft documentation - https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/connect-azurermaccount?view=azurermps-6.13.0
- Get-AzureRmSubscription
- Once a connection is established, this should allow us to output all associated subscriptions our Service Principal Account may access
- For more details on this function in particular, note the Microsoft documentation - https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/get-azurermsubscription?view=azurermps-6.13.0
- Get-AzureRmVmSize -Location <A specified Azure Location, e.g. US Central>
- This should output all available Azure VM sizes for the specified location
- The Location itself may be fed into the command as a String - e.g. 'Central US'
- For more details on this function in particular, note the Microsoft documentation - https://docs.microsoft.com/en-us/powershell/module/azurerm.compute/get-azurermvmsize?view=azurermps-6.13.0
- Get-AzureRmLocation
- Utilised in the Logic as Get-AzureRmLocation | Where-Object {$_.providers -contains "Microsoft.Compute"}
- This outputs all Locations that contain the relevant Microsoft.Compute resource provider
- For more details on this function in particular, note the Microsoft documentation - https://docs.microsoft.com/en-us/powershell/module/azurerm.resources/get-azurermlocation?view=azurermps-6.13.0
Manually running these functions may be used to ascertain whether all permissions for service principal accounts are in order, for example.
This can also be used to confirm if there's any network firewalls, etc, blocking particular functions of the Reader.
Related Articles
Resolve SSH connection issues to Flexera-managed AWS instances 2Number of Views Fix SSH connection issues when using enhanced networking in AWS 2Number of Views Web proxy values configured for PowerShell connection beacon UI are not used when clicking the "Test Connection" button 12Number of Views PowerShell connection creation fails with a PowerShell connection exception 8Number of Views Powershell Connection Creation Fails with 'Powershell Connection Exception, possible reasons include malformed config file' 8Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago