191 Matching Annotations
  1. Sep 2024
    1. add

      don't forget to put ; just before this entry and no spaces needed ;targetisaadjoined:i:1 (this is just describing what you will do, step 4 below is actually doing it!!)

    1. $jsonContent = @"

      Script slightly wrong!! ?Here is correct one. Looks exactly the same!!

      https://github.com/MicrosoftLearning/AZ-140-Configuring-and-Operating-Microsoft-Azure-Virtual-Desktop/blob/master/Instructions/Labs_EntraID/07_LAB_15_01_Create_custom_session_host_images_by_using_image_templates_StandAlone.md CORRECT

      $jsonContent = @" { "Name": "Desktop Virtualization Image Creator (random)", "IsCustom": true, "Description": "Create custom image templates for Azure Virtual Desktop images.", "Actions": [ "Microsoft.Compute/galleries/read", "Microsoft.Compute/galleries/images/read", "Microsoft.Compute/galleries/images/versions/read", "Microsoft.Compute/galleries/images/versions/write", "Microsoft.Compute/images/write", "Microsoft.Compute/images/read", "Microsoft.Compute/images/delete" ], "NotActions": [], "DataActions": [], "NotDataActions": [], "AssignableScopes": [ "/subscriptions/$subscriptionId", "/subscriptions/$subscriptionId/resourceGroups/az140-15b-RG" ] } "@

  2. Jul 2024
  3. Jun 2024
    1. just make sure that you have moved cl11 into wvd infra and done that section of the conditional access lab, changed device settings to domain joined

    1. az140-25-vm0,

      make sure you've done some things so we can see when we create our new vms for session hosts from this image it looks like its doing something

    1. following to generate the token necessary to join new hosts to the pool

      note the order you are doing things. You always need to have a token before you can join new hosts to a pool.

      A registration token is required to authorize a host to join the pool. The value of token’s expiration date must be between one hour and one month from the current date and time.

      Needed if there is a delay in joining session host to the pool because on because day 2 we didn't need registration token, but you can still do it direct from the portal as well. When you click on add host there's an option to generate a registration token.

    1. Connect-AzAccount

      Type this command first to allow you to login without any problems when using MFA

      Update-AzConfig -EnableLoginByWam $false

      then Connect-AzAccount or

      $tenantId = (Get-AzContext).Tenant.Id

      Import-Module -Name AzureAD

    1. Optional but maybe interesting

      kubectl exec is a command in Kubernetes that allows you to execute commands inside a running container within a pod. It provides a way to interact with the running processes inside the container, similar to how you would SSH into a virtual machi

    2. d see a v2 message in the dev namespace and a v1 message in production.

      i just see the doctype html file, if IU choose the frontend, when I type curl 10.0.1.81:8080 you need to choose the one that says lab4backend-**

      curl 10.0.1.82:8080 gives a nice message - not in the midst of an html file

    3. here's only one placeholder remaining in our simple front end application, for the data from the backing service. Let's finish that off now by applying (a copy of) the sfe deployment in both namespaces. Again, you might wish to change the lab3frontends to lab4frontends or simply frontends.

      you can use the files in starters or solutions folder if you don't have the files from previous labs - from explorer view in vs code connection

    1. volumeMounts: - name: homepage mountPath: /usr/local/apache2/htdocs/ volumes: - name: homepage hostPath: path: /home/student/index.html

      I asked chatgpt where to put this, gave it the original file and then told it I needed to add this section

      spec: containers: - name: httpd image: httpd resources: {} volumeMounts: - name: homepage mountPath: /usr/local/apache2/htdocs/ volumes: - name: homepage hostPath: path: /home/student/index.html

    2. /apache2/htdocs/.

      I think it would be easier if you just put the whole file and the new stuff in bold, as it's so easy to put in wrong place, I'm getting

      rror from server (BadRequest): error when creating "lab3web.yaml": Deployment in version "v1" cannot be handled as a Deployment: strict decoding error: unknown field "spec.template.metadata.volumeMounts", unknown field "spec.template.status", unknown field "spec.template.volumes"

      I asked chatgpt and it did well

      spec: containers: - name: httpd image: httpd resources: {} volumeMounts: - name: homepage mountPath: /usr/local/apache2/htdocs/ volumes: - name: homepage hostPath: path: /home/student/index.html

    3. OPTIONAL stretch goal see if you can find the emptyDir in your hosts' file system. It will involve finding out which node the pod is running on, connecting to that node and working out where in the file system the emptyDir is (you might be able to find a file named data-volume). Once you have found it, you could look for the files therein. Also, if you do take on this chalenge, observe, once you've deleted the pod, that the directory is removed.

      What was the answer to this was it

      kubectl get pod kvstore -o wide to find the name of the node that it's on - mine was on k8s-worker-1

      I then went into ssh settings in visual studio code and added a host so my ssh config file is now

      Host worker0 HostName 18.171.145.65 User student IdentityFile c:\users\karen\downloads\qwikLABS-L138956-206416.pem Host worker1 Hostname 35.178.200.149 User student IdentityFile c:\users\karen\downloads\qwikLABS-L138956-206416.pem Host controller Hostname 13.40.152.189 User student IdentityFile c:\users\karen\downloads\qwikLABS-L138956-206416.pem

      and I opened them up in 3 separate vs code windows

      kubectl get pod <pod-name> -o jsonpath='{.metadata.uid}'

      kubectl get pod kvname -o jsonpath='{.metadata.uid}'

      and then

      on k8s-worker-1 in the terminal windows I used the syntax and replaced my id I had retrieved from above command in the poduid:

      /var/lib/kubelet/pods/<podUID>/volumes/kubernetes.io~empty-dir/

      sudo ls //var/lib/kubelet/pods/37abdd08-c0f7-4549-a9cc-20df89ed7fa8/volum es/kubernetes.io~empty-dir/

      you have to run it with sudo permissions otherwise you get denied access, but then you can see data-volume

      I then did sudo -i

      cd /var/lib/kubelet/pods/37abdd08-c0f7-4549-a9cc-20df89ed7fa8/volumes/kubernetes.io~empty-dir/

      ls (to see directory listing it shoowed me data-volume)

      cd data-volume

      ls

      it then showed me age and name which were the two values I had put in there

    4. emptyDir: {}

      apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: run: kvstore name: kvstore spec: containers: - image: abhirockzz/kvstore name: kvstore volumeMounts: - mountPath: /data name: data-volume volumes: - name: data-volume emptyDir: {} dnsPolicy: ClusterFirst restartPolicy: Always status: {}

      I removed the line resources: {} at the end as kept getting error saying did not find expected - indicator. The above file works

  4. May 2024
    1. grep (this command is case sensitive):

      Grep is a useful command to search for matching patterns in a file. grep is short for "global regular expression print".

  5. Apr 2024
    1. and the RG1 resource group in the Scope column Select VM1, and then select Next: Collect >

      if you are doing this from scratch you will have to create a vm1 in RG1

    1. eploy Microsoft Sentinel to the workspace.

      From the Microsoft Sentinel menu (add it from All services if needed) - choose +Create button and select your workspace from Task 1 and click the Add button

  6. Feb 2024
    1. Get-AzVM -ResourceGroup 'az140-21-RG' | Enable-AzVMPSRemoting

      ensure you have already run instal-module -name az -force

      this command only works from cloud shell not from powershell ise

    2. student@adatum.com

      make sure you are selecting student@adatum.com otherwise you get kerberos error later - because you are using the user account as session host id domain joined

    1. Install-Module -Name AzureAD -Force Import-Module -Name AzureAD

      If you get the error The current processor architecture is: X86. The module 'C:\Program Files (x86)\WindowsPowerShell\Modules\AzureAD\2.0.2.182\AzureAD.psd1' requires the following architecture: Amd64. - you have used Powershell ISE x86 instead of the main Powershell ISE and you will have to run all the previous commands again!

      The powershell module AzureAD is going to be kept for a bit and then Microsoft Graph will be used, even though we are changing to Microsoft Entra ID

    1. Windows Server 2022 Datacenter: Azure Edition – x64 Gen2

      I chose that, but when it came to looking at Application insights on vm - map it said

      To enable the Map feature, configure Processes and dependencies in the Data Collection Rules for VM insights. Learn more You are using an OS version (MicrosoftWindowsServer WindowsServer 2022-datacenter-azure-edition) that is not supported. For more details on supported OS and kernel versions please review our support matrix

    2. Networking page, choose Add inbound port rule.

      On the Network settings click the hyperlink for WS-VM1-nsg to go to the Network security group and from there crate a new inbound rule, or choose Create port rule blue button at the right side and choose inbound port rule

    1. Add Test Group.

      although we aren't changing the other settings, the Workspace will default to your log analytics workspace as there is only one, but you could use the drop down menu to change it. The create alert has been filled in with a condition called whenever the count test result is greater than 2 count

    2. Create a data collection rule

      probably have to wait a few minutes otherwise the new data collection endpoint won't appear from the data collection endpoint - so check that first before giving it a name and resource group, if necessary close the data collection rule, wait a few more minutes and try again

    1. On the Apply Monitoring Settings dialog box, choose Yes.

      From the web app, select the Diagnostic settings menu and from there +Add diagnostic setting and then choose HTTP logs from there. This section seems to be duplicated, it ells you how to do it properly below!

  7. Jan 2024
  8. Dec 2023
    1. select Microsoft Entra Connect.

      i got error saying ad sync service not running - go to services, and its called Microosft Azure AD Sync - mine said automatic, but had to click on STart to start it

    1. Shut down or sign out

      It's important to sign out to commit the change to the profile. You can put the session host that you connected to in drain mode, to ensure your next test you connect to a different session host

  9. Nov 2023
    1. Identify and monitor external assets by using Microsoft Defender External Attack Surface Management

      this was in both sets of objectives, but was never in previous course

    2. Recommend when to use and configure a Microsoft Entra Application Proxy, including authentication

      this was never in the course before, but now appears to be in previous objectives

  10. Oct 2023
    1. Download Azure AD Connect

      yes still called that here!! This will be Azure AD Connect V2 - so it will continue to be supported, it's v1 that is not going to be supported going forward

    2. '<password>'

      you need to replace this with your chosen password that will meet complexity for passwords in Active Directory on prem and then later in Microsoft Entra ID

    3. into the Cloud Shell home directory.

      make sure you add them separately, if you shift click to select them both, only one will be uploaded. You can try opening the cloud shell window and dragging both files in from file explorer - this works well.

    4. This might take about 15 minutes.

      Please double check at this time, the script did what it was supposed to do. Go into the virtual network and from the menu select DNS servers and ensure that the DNS server now says custom and is pointing at 10.0.0.4 which is the domain controller you've just built... otherwise everything goes wrong from here on in!! If it doesn't say it, and the script has completed, please update it manually so it does say it.

    5. Allow the quota request to complete.

      you will need to initiate the request again, after setting up MFA - just stay in the New Quota Request window to wait for the update to happen or duplicate the browser tab to continue with lab.

    6. Create storage.

      after creating the storage account, you might get an error saying you need to register your Azure Cloud shell. To do this. Go to your subscription and make a note of the subscription id, and then run these commands, substituting the subscription id and removing the chevron brackets.

      az account set --subscription < subscription name or id >

      az provider register --namespace Microsoft.CloudShell

      for example

      az account set --subscription b07aadc9-aade-4982-9d2c-7b42caaaaaaaa

      az provider register --namespace Microsoft.CloudShell

  11. Sep 2023
    1. Dismount-VHD -Path "C:\Allfiles\Labs\04\MSIXVhds\$appName.vhd" -Confirm:$false

      you will need to add the line $appName="XmlNotepad" above as we overwrote the whole code for step 6 or alternatively overtype $appName.vhd with XmlNotepad.vhd

    1. 9cdead84-a844-4324-93f2-b2e6bb768d07

      you need to copy and select and paste the whole number, as if you start typing it doesn't find it. You can actually just type Azure Virtual desktop instead

    1. Student lab manual

      I would suggest, just before taking the image and sysprepping the vm, do something to the vm like create a folder or shortcut so you can see it when you test it.

    2. az140-25-vm0

      might be a good idea to create a folder on the desktop and a folder in the c drive with your name, just so when you finish you can see that it's done something!!

    3. Availability options

      If you get asked Security type, be sure to select Standard, as TrustedLaunch isn't supported. If the deployment fails use the Redeploy button and ensure everything is selected correctly.

    4. feedback hub collection of telemetry data:

      Microsoft collects Windows diagnostic data to solve problems and to keep Windows up to date, secure, and operating properly. It also helps us improve Windows and related Microsoft products and services and, for customers who have turned on the Tailored experiences setting, to provide more relevant tips and recommendations to enhance Microsoft and third-party products and services for each customer’s needs.

    5. Storage Sense:

      Storage Sense can automatically free up drive space for you by getting rid of items that you don't need, like temporary files and items in your Recycle Bin

    6. Start-BitsTransfer -Source "https://aka.ms/edge-msi" -Destination 'C:\Allfiles\Labs\02\MicrosoftEdgeEnterpriseX64.msi' Start-Process -Wait -Filepath msiexec.exe -Argumentlist "/i C:\Allfiles\Labs\02\MicrosoftEdgeEnterpriseX64.msi /q"

      Background Intelligent Transfer Service (BITS) is used by programmers and system administrators to download files from or upload files to HTTP web servers and SMB file shares

    7. z140-25-vm0 | Connect blade, select Use Bastion.

      you may find that the vm is in a not ready state as it's still finishing deploying so just be patient, even though the bell icon is suggesting it's finished

    8. az140-25-vnet y

      Another alternative is to set up peering between your new VNet and the vnet11 you already created, and then you can use the bastion you already deployed. If you do this you can just go straight to task 3

    1. yyyy-MM-ddTHH:mm:ss.fffffffZ

      This is UTC time zone format For instance, UTC time in ISO-8601 is xx:xx:xxZ - just seems to show AM or PM next to the hours minutes and seconds

    2. Private IP address (10.0.3.4)

      because you are already on an Azure virtual machine which is pretending to be your on premises domain controller you can use the private ip address.

    1. Azure Active Directory

      this name has changed to Microsoft Entra ID - so wherever you see the wording Azure Active Directory or Azure AD, they are talking about Microsoft Entra ID

    2. $adminRegEntry =

      this doesn't actually exist, so use the Server Manager - local server - and click on IE Enhanced security configuration and turn both to Off

    1. In the Stay signed in to all your apps window, clear the checkbox Allow my organization to manage my device checkbox and select No, sign in to this app only.

      I didn't see this.

    2. in via Remote Desktop to a host.

      not sure what this means - but from the Azure portal, you can go to Azure Virtual desktop - Host pools - az140-23-hp2 - Session hosts and see the total sessions on each of the session hosts and who the assigned user is.

    3. In the Stay signed in to all your apps window, clear the checkbox Allow my organization to manage my device checkbox and select No, sign in to this app only.

      you might not get this.

    4. az140-23-p2-2.

      I have two virtual machines and they are called az140-23-p2-0 and 23-p2-1. The parameters file we used, says prefix az140-23-p2 and the number of instances was 2 - so it has built 2 vms, and called the first one 0 and the second one 1

    5. bout 15 minutes.

      if it fails, best to remove all deployments from the REsourcegroup az140-23-RG and then start again, and ensure all fields are filled in, including vm location with eastus, as it's not a required field, and the entire NSG id is correct, starting with subscription/ Also ensure you created your subnet hp2-Subnet with the correct name.

    6. (leave others with their existing values):

      there will be quite a few ones which are not mentioned here which are to remain blank, you only need to have values with the fields with the red stars.

    7. From your lab computer, start a web browser, navigate to the Azure portal, and sign in by providing credentials of a user account with the Owner role in the subscription you will be using in this lab.

      you are already there!!

    1. g File Explorer.

      you can check to see your storage account by looking in Active Directory users and computers and looking under the WVDInfra Organisational unit it will be shown as a computer account object.

    2. Transaction optimized

      there is a new default option to turn on backup on the second tab - you can leave that on, or take it off to save some money whilst doing the lab.

    1. aduser1 via its group membership.

      should be Desktop from DAG, Word, Powerpoint and Excel from Office 365 and CMD prompt from Utilities because user 1 has been assigned to all of the application groups via group membership of az140-wvd-pooled for DAG and Utilities RAG and az140-wvd-remote-app for Office365-RAG

    2. aduser1 credentials,

      if you've not made a note of the credentials for your user, you need to reset it from the domain controller and then run through Azure AD Connect again to sync the change as we didn't set up password writeback

    3. $computerName = 'az140-cl-vm11' Invoke-Command -ComputerName $computerName -ScriptBlock {Add-LocalGroupMember -Group 'Remote Desktop Users' -Member 'ADATUM\az140-wvd-users'}

      I got the red text, but it wouldn't work, as the az140-cl-vm11 hadn't joined the adatum.com domain. REstart the vm if it hasn't been restarted since changing the DNS server for the virtual network and then log on to the vm and change the system properties so that you can join it to the adatum.com domain using Student and Pa55w.rd1234 credentials. I ended up right-mouse clicking on STart menu and choosing Computer management and then going into local users and groups and adding az140-wvd-users to the Remote Desktop Users

    4. 0

      If you go into the shortcut of Command Prompt - Properties and look at Shortcut - Change icon button you will see the icons available. The first one is the zero, and then you count from there which icon you would like.

    5. pool consists of two hosts

      make sure the deployment has finished, if there's nothing there! If you look and it says the hosts are unavailable - it means: The AVD agent has not successfully communicated with the AVD Management Service, or the agent is unable to update itself to the latest version. This can also show temporarily while AVD waits for the OS to boot up and the agent to come online. In this scenario, the AVD agent did register to the AVD service. Most likely that the virtual machines didn't join the domain. So you will have to do this manually. Firstly check that the virtual network DNS server points at your domain controller 10.0.0.4. Then you need to use the Restart button to restart your virtual machines az140-21-p1-0 and 1 from the virtual machines view, so they see the new DNS settings. After restarting, connect to each vm az140-21-p1-0 Go to System properties and change the computer name to be part of domain adatum.com, using credentials Student and Pa55w.rd1234. After restarting your vm, wait a bit, and then check back in your host pool and you should see in the host pool that they are now available. Although the virtual machines show as running in the virtual machines view, they take a long time to change the status in the session hosts

  12. Aug 2023
    1. Add applications.

      virtual machines need to be up and running to be able to add the applications, otherwise you get error The host pool does not contain available virtual machines

    2. az140-21-hp1

      if at any stage you see the letter a next to a name it means you have selected the wrong instructions and you are doing the Azure Active Directory - not Active Directory - ie on premises being used as your identity directory