Azure Rest-API Calls from PowerShell

Here is a simple Rest-API call from PowerShell for creating the resource group, using the App Registration:   # Set the Azure AD tenant ID, client ID, and client secret $tenantId = “<tenant-id>” $clientId = “<client-id>” $clientSecret = “<client-secret>” # Set the Azure subscription ID, resource group name, and location $subscriptionId = “<subscription-id>” $resourceGroupName = “<resource-group-name>” $location = “<location>” # Obtain a bearer token using Azure AD client credentials flow $tokenEndpoint = “https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token” $body = @{     grant_type    = “client_credentials”     client_id     = $clientId     client_secret = $clientSecret     scope         = “https://management.azure.com/.default” } $response = Invoke-RestMethod -Method Post -Uri $tokenEndpoint -Body $body $accessToken = $response.access_token # Create the resource group using Azure REST API $resourceGroupEndpoint = “https://management.azure.com/subscriptions/$subscriptionId/resourcegroups/$resourceGroupName” $resourceGroupEndpoint = $resourceGroupEndpoint + “?” + “api-version=2021-04-01” $headers = @{     Authorization = “Bearer $accessToken”     “Content-Type” = “application/json” } $body = @{     location = $location } | ConvertTo-Json $response = Invoke-RestMethod -Method Put -Uri $resourceGroupEndpoint -Headers $headers -Body $body Write-Host “Responce:” Write-Host $response

Private ChatGPT (Azure OpenAI Service + Custom Data + Deploy Web App)

The most wanted feature that you can see during Keynote at Build 2023. SO you can add custom data to gpt-3.5-turbo and than use the chat gpt. Also you see how to configure chat gpt. See step by step – how I build the public ChatGPT than add a Custom Data to answer questions about company products. Finally deploy the chat. Some important info about configuration that we can adjust: Azure OpenAI on your data enables enterprise users to utilize OpenAI’s powerful conversational AI models, such as ChatGPT and GPT-4, on their own data while complying with their organizational policies. Azure OpenAI service is combined with Azure Cognitive Search to index and retrieve data that is private and external to the ChatGPT large language model. The retrieval step in Azure Cognitive Search finds the most relevant pieces of information and presents the top ranked results to the language model. And because the knowledge lives outside of the ChatGPT model, you’re in control — it is not used to train the model. Your data source is used to help ground the model with specific data. Azure OpenAI on your data provides many options of data storage to select from, including an … Private ChatGPT (Azure OpenAI Service + Custom Data + Deploy Web App)Read more

PWA Applications with Visual Studio Code (PWABuilder Studio) – First Steps

PWA Applications – First Steps   Do you remember PhoneGap, Apache Cordova (https://rzetelnekursyold.dev/android-ios-osx-windows-apache-cordova-azure/), Adobe PhoneGap or AppInventor (BTW: https://www.youtube.com/@programowaniezoliwia5426) – expect the AppInventr all of them allows write Applications in HTML/JavaScript and compile it as a: Android browser ios osx windows (store) All of them are better or worse but nowadays seems that the PWA standard is the most comprehensive, practical, and more manageable, especially with the extension for Visual Studio Code (https://marketplace.visualstudio.com/items?itemName=PWABuilder.pwa-studio). Some advertisements about PWA applications: PWA combines the best of the web and compiled apps PWA can still work when the device is offline. PWAs can be installed on the operating system. PWAs support push notifications and periodic updates PWAs can access hardware features PWA Handle files PWA share content with other apps PWA Access the clipboard PWA Sync data and fetch resources in the background PWA Access device hardware such as Bluetooth and USB PWA Store content in databases PWA Takes advantage of hardware-accelerated graphics. PWA Uses CSS layouts, animations, and filters to create advanced designs PWA Run near-compiled performance code with WebAssembly PWA can be added to the Start menu PWA can be pinned to the Taskbar PWAs can run when the user signs in … PWA Applications with Visual Studio Code (PWABuilder Studio) – First StepsRead more

GUI and IM integration with ChatGPT/OpenAI

ChatGPT has changed the way we talk with the computer. Sooner, we can self-train GPT-3 and GPT-4 models with our Microsoft Azure (Open AI) data. So we will be able to make an internal ChatGPT for our company. While ChatGPT is a simple API, a friendly GUI with integration with instant messaging platforms is another story. For that, I propose the following two projects: https://www.chatbotui.com/ https://github.com/wechaty/ ChatGPT zmienił sposób, w jaki rozmawiamy z komputerem. Wkrótce będziemy mogli samodzielnie trenować modele GPT-3 i GPT-4 przy użyciu Microsoft Azure (Open AI). Dzięki temu będziemy mogli stworzyć wewnętrzny ChatGPT dla naszej firmy. Podczas gdy ChatGPT jest prostym interfejsem API, przyjazny GUI z integracją z platformami do przesyłania wiadomości błyskawicznych to inna historia. W tym celu proponuję dwa projekty: https://www.chatbotui.com/ https://github.com/wechaty/

Infrastructure as a Code vs Portal – Easy enter to Infrastructure as a Code

Infrastructure as a Code – everything should be deployed using this strategy…. but life is life… Today during Global Azure 2023 (thx Maciej), I discovered a new tool that allows synchronization, Azure Portal Changes vs. Code; it is stored in Azure DevOps or GitHub. So simply, the tool export ARM templates to the GIT repository and after updating it in GIT sync the changes with Azure. Please be aware that it is simply a dump of resource group definition (export template), so not always easy to deploy it back to Azure without modification, but it is always the first step. The tool is open-source, developed by Microsoft, and available here: https://github.com/Azure/AzOps-Accelerator. BTW my tool available here is only one way – Export Templates to GIT, and you can check it here: https://github.com/MariuszFerdyn/AzureTrackDeployments.

Defender For Cloud – Security alerts – a reference guide (Containers)

QID NAME DESCRIPTION REMEDIATION CATEGORY SUBASSESSMENTIMPACT SEVERITY 105095 User(s) With Blank Password The users have the blank password in the shadow file. These users connect to the system without entering a password. Set the password for all the users. Security Policy An attacker may connect to the system by knowing just the username. High 105936 OpenSSH Command Injection Vulnerability (Generic) OpenSSH is the premier connectivity tool for remote login with the SSH protocol.  <P> scp in OpenSSH through 8.6p1 allows command injection in the scp.c toremote function, as demonstrated by backtick characters in the destination argument. <P> Affected Versions:<BR> 8.6p1 and prior versions of OpenSSH <P> QID Detection Logic:<BR> The QID checks for the vulnerable versions of OpenSSH and checks the presence of scp command by executing ‘which scp'<P> Note : Affected version checked till 8.6p1 as per PoC. No solution available from Linux vendors yet.<P>Workaround:<BR>As per upstream, because of the way scp is based on a historical protocol called rcp which relies on that style of argument passing and therefore encounters expansion problems. Making changes to how the scp command line works breaks the pattern used by scp consumers. Upstream therefore recommends the use of rsync in the place … Defender For Cloud – Security alerts – a reference guide (Containers)Read more