Exemplo n.º 1
0
        public async Task <Unit> InstallAzureCli()
        {
            try
            {
                logger.Debug("Installing AzureCli...");

                await powerShellService.Execute(
                    @"Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi");
            }
            catch (Exception e)
            {
                logger.Error("AzureCli can not be installed!", e);
            }
            return(Unit.Default);
        }
Exemplo n.º 2
0
        private async Task <Collection <PSObject> > ExecutePowerShellCommand(string command)
        {
            var result = await powerShellService.Execute(command);

            return(result);
        }