My requirement is to install apps in Microsoft store using SYSTEM account. But they are all getting installed only using admin user privileges. When I tried to install an app in Microsoft store using Add-AppxPackage utility with SYSTEM user, I'm getting the following error.
**PS C:\Windows\system32> Add-AppxPackage -Path C:\Path to file.appxbundle -Verbose VERBOSE: Performing the operation "Deploy
package" on target "C:\Path to file.appxbundle". Add-AppxPackage :
Deployment failed with HRESULT: 0x80073CF9, Install failed. Please
contact your software vendor. (Exception from HRESULT: 0x80073CF9)
Deployment Add operation rejected on package
Microsoft.RemoteDesktop_2020.1208.2040.0_neutral_~_8wekyb3d8bbwe from:
Microsoft.RemoteDesktop_2020.1208.2040.0_neutral___8wekyb3d8bbwe.appxbundle
install request because the Local System account is not allowed to
perform this operation. NOTE: For additional information, look for
[ActivityId] bc984532-ed5b-0000-41db-98bc5bedd601 in the Event Log or
use the command line Get-AppPackageLog -ActivityID
bc984532-ed5b-0000-41db-98bc5bedd601 At line:1 char:1
Add-AppxPackage -Path C:\Path to file ...
+ CategoryInfo : WriteError: (C:\Path to file...bbwe.appxbundle:String) [Add-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
VERBOSE: Operation completed for:
C:\Path to file.appxbundle**
Is there any way, I can install these application using SYSTEM account?
Related
I'm having a really weird issue. I'm unable to import the Azure AD Sync module.
Here's what I've tried:
Import-Module ADSync
Import-Module "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\ADSync.psd1"
I'm getting the following error:
Import-module : Could not load file or assembly 'file:///C:\Program
Files\Microsoft Azure AD
Sync\Bin\Microsoft.Azure.ActiveDirectory.Synchronization.ProvisioningWebServiceAdapter.dll'
or one of its dependencies. An attempt was made to load a program
with an incorrect format. At line:1 char:1
+ Import-module adsync
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], BadImageFormatException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
I'm running under the following premise:
Azure AD Connect 1.2.70
Powershell 4.0
Windows Server 2012R2
The account I'm using is a Domain Admin and should have full permissions. I'm RDPing into the server. I'm also running Powershell as an Administrator. I've checked all installations and frameworks and they are either up to date or not applicable. AD sync is running just fine, I'm just trying to get the powershell CMDlets to work so that I can add them to a script I'm writing.
UPDATE: See below answers for solution. Reinstalling AAD was the solution.
Was able to import the module using below command, please try it out.
Import-Module –Name "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync" -Verbose
Additional Documentation Reference for:
Download
Version
Automatic Upgrade
Hope this helps.
I am trying to fetch AAD app info using "Get-AzureADApplication" command. but getting the below error-
Get-AzureADApplication : You must call the Connect-AzureAD cmdlet before calling
any other cmdlets.
At C:\Users\v-pasahu\Desktop\Sample.ps1:18 char:11
+ if($app = Get-AzureADApplication -Filter "DisplayName eq '$($AppName) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzureADApplication], AadNee
dAuthenticationException
+ FullyQualifiedErrorId : Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthe
nticationException,Microsoft.Open.AzureAD16.PowerShell.GetApplication
According to the error message, you need to run the command Connect-AzureAD first.
Besides, if you do not install azure powershell module, you should install it before using azure ad powershell.
Looking at the comments you have said you want to run this in the non interactive flow. To do this you must follow the instructions here to log in as a service principal.
Alternatively depending on what you are trying to do you may find it easier to Login using the AzureRm cmdlets.
I am trying to use runbook in Azure automation account to process Azure Analysis Service cube.
I followed Microsoft blog https://learn.microsoft.com/en-us/azure/automation/automation-runbook-gallery.
However I got following error message when testing it. My runbook script is as following: Can you please help?
Runbook Script:
$SPCredential = Get-AutomationPSCredential -Name "TestCred"
$null = Invoke-ProcessASDatabase -databasename "SalesCube" -server "asazure://xx" -RefreshType "Full" -Credential $SPCredential
Write-Output "Done"
error message:
Invoke-ProcessASDatabase : The term 'Invoke-ProcessASDatabase' is not
recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:5 char:9
+ $null = Invoke-ProcessASDatabase -databasename "SalesCube" -ser ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-ProcessASDatabase:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Thank you for reporting this issue. We reported this thread to Microsoft this morning.
The following answer is coming from a Microsoft Azure manager:
An issue has been identified with the .Net version for Azure
Automation sandboxes that released a lower version then what was used
previously. An update is rolling out to support .Net 4.6 that should
resolve issues with PowerShell modules depending on a version on or
above .Net 4.5. It is currently planned to be rolled out to all
regions by next Monday (the 5th).
Hope this helps.
This appears to be an issue with Azure Automation this morning. I have a runbook that has completed successfully for weeks and today it failed with the same error message the OP reported. I've opened a support ticket with MS. If it is a widespread problem, perhaps they will have a fix soon.
--mf
When I try to run "Add-AzureAccount" command in the powershell, I encountered the error below:
I am using the latest Azure powershell version 0.87
Add-AzureAccount : multiple_matching_tokens_detected: The cache
contains multiple tokens satisfying the requirements. Call
AcquireToken again providing more requirements (e.g. UserId) At line:1
char:1
Add-AzureAccount
~~~~~~~~~~~~~~~~
CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException
FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount
Go to C:\Users\<user>\AppData\Roaming\Windows Azure Powershell and delete WindowsAzureProfile.xml. That helped me.
Try downloading the latest version. There was an issue around collisions in the token store that was fixed.
https://github.com/Azure/azure-sdk-tools/releases/tag/v0.8.8-September2014
I am following this tutorial to deploy node.js application from my machine to windows azure:
https://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
my command is as below:
Publish-AzureServiceProject -ServiceName socketlistener -Location "East US" -Launch
but I am getting the following error
Publishing to Windows Azure. This may take several minutes...
1:32:36 PM - Preparing runtime deployment for service 'socketlistener'
1:32:38 PM - Preparing deployment for socketlistener with Subscription ID: ***...
1:32:40 PM - Verifying storage account 'socketlistener'...
Publish-AzureService : Path for package doesn't exist in D:\dev\node\socketlistener\cloud_package.cspkg.
At line:1 char:21
Publish-AzureService <<<<
CategoryInfo : CloseError: (:) [Publish-AzureService], FileNotFoundException
What I am suspecting is that there is some issue with your application configuration (Service Definition or Service Configuration) which is causing problem in package creation. The error message also suggests the same problem. Based on Publish-AzureServiceProject command execution the next step is to create the package after verifying the storage account. And after the package creation, the next step is to connect service endpoint which you can verify in the same link above you are following in tutorial.
To verify that there is no issue with your machine or connection to Windows Azure application, try creating a new Node.js application, add new web/worker role and do not make any changes in configuration then try deploying. This will verify if there is any issue with your machine configuration (if any) or other issue:
New-AzureServiceProject your_node_project
Add-AzureNodeWebRole
Publish-AzureServiceProject -ServiceName socketlistener -Location "East US" -Launch