Wiedza
  • 0 Koszyk
  • Kontakt
  • Moje konto
  • Blog
  • MOC On-Demand – co to takiego?
  • MOC On-Demand – Co zyskujesz?
  • Kursy MS

Sprawdzenie poprawności działania komunikacji CSV dla Microsoft Failover Cluster dla Hyper-V

Rozwiązania wysokiej dostępności z wykorzystaniem technologii Microsoft Failover Cluster dla Hyper-V wraz z Clustered Shared Volume konfiguruje się dosyć prosto i można powiedzieć, że rozwiązanie działa out of the box.

Problemy mogą zacząć się, gdy środowisko się rozrasta i/lub zaczyna być poważnie obciążone np. Podczas backupu Clustered Shared Volumes.

W przypadku Clustered Shared Volumes odczyt i zapis danych odbywa się z wykorzystaniem bezpośredniego połączenia każdego węzła z zasobem dyskowym, czy też po iSCSII lub Fibre Chanell. Wyjątek tutaj stanowi zapisywanie metadanych – czyli np. powiększanie pliku, zmiana uprawnień – wówczas wykorzystywany jest ruch CSV po sieci Ethernet do węzła, który jest właścicielem danego dysku.

W przypadku jakichkolwiek problemów z komunikacją możemy ujrzeć następujące błędy, w końcowym stadium powodujące wyłączenie jednego z węzłów.

Source EventID Details
FailoverClustering

1126

Cluster network interface ‘Heartbeat (NIC1) (1)’ for cluster node on network ‘Heartbeat’ is unreachable by at least one other cluster node attached to the network. The failover cluster was not able to determine the location of the failure. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapter. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.
i40ea

27

Intel(R) Ethernet Converged Network Adapter X710 #2 Network link is disconnected.
Hyper-V-VmSwitch

22

Media disconnected on NIC /DEVICE/ (Friendly Name: Microsoft Network Adapter Multiplexor Driver).
MsLbfoSysEvtProvider

16949

Member Nic Disconnected.
i40ea

27

Intel(R) Ethernet Converged Network Adapter X710 Network link is disconnected.
MsLbfoSysEvtProvider

16949

Member Nic Disconnected.
MsLbfoSysEvtProvider

16945

Member Nic Disconnected.
sdddsm

24

MPDISK reservation preempted.
FailoverClustering

1135

Cluster node was removed from the active failover cluster membership. The Cluster service on this node may have stopped. This could also be due to the node having lost communication with other active nodes in the failover cluster. Run the Validate a Configuration wizard to check your network configuration. If the condition persists, check for hardware or software errors related to the network adapters on this node. Also check for failures in any other network components to which the node is connected such as hubs, switches, or bridges.
FailoverClustering

5120

Cluster Shared Volume ‘Volume3’ has entered a paused state because of ‘(c000020c)’. All I/O will temporarily be queued until a path to the volume is reestablished.
FailoverClustering

5120

Cluster Shared Volume ‘Volume4’ has entered a paused state because of ‘(c000020c)’. All I/O will temporarily be queued until a path to the volume is reestablished.
i40ea

27

Intel(R) Ethernet Converged Network Adapter X710 Network link is disconnected.
Hyper-V-VmSwitch

22

Media disconnected on NIC /DEVICE/ (Friendly Name: Microsoft Network Adapter Multiplexor Driver).
MsLbfoSysEvtProvider

16949

Member Nic Disconnected.
i40ea

27

Intel(R) Ethernet Converged Network Adapter X710 #2 Network link is disconnected.

Najważniejsze to rozdzielenie ruchu sieciowego na różne karty sieciowe dla:

  • Maszyn Wirtualnych
  • Live Migration
  • HeartBeat
  • Ruchu CSV
  • Backupu (o ile wykonywany jest po sieci)

Nawet jeżeli nie mamy tyle fizycznych kart sieciowych do rozdzielenia ruchu zastosujmy wirtualne karty sieciowe (Add-VMNetworkAdapter), dodatkowo rozważmy zastosowanie Teamingu kart sieciowych. Poprawny opis konfiguracji sieci w Microsoft Failover Cluster znajdziemy tutaj: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj735302%28v=ws.11%29.

Po, których kartach sieciowych odbywać się ma ruch Kliencki (Maszyn Wirtualnych), HeartBeat oraz ruch Live Migration ustawiamy w Failover Cluster Manager.

Domyślnie ruch CSV będzie odbywał się po sieci HeartBeat – co zazwyczaj jest dobrym wyborem, chyba, że sieć ta nie jest za szybka. Do kontroli, którą siecią ma odbyć się ruch CSV służą metryki. Aby je wyświetlić używamy komendy:

Get-ClusterNetwork|ft Name,Metric,AutoMetric

Użyta zostaje sieć z najniższą metryką i możemy ją zmodyfikować poniższą komendą, aby wybrać sieć dedykowaną do ruch CSV:

(Get-ClusterNetwork eth0).metric=800

Jeżeli natomiast, z jakiś przyczyn chcemy aby ruch CSV odbywał się po sieci klienckiej powinniśmy wykonać (zazwyczaj nie jest to zalecane):

(get-cluster).UseClientAccessNetworksForSharedVolumes=$true

Dodatkowo aby zoptymalizować ruch między węzłami Clustra warto zaznaczyć opcje Microsoft Failover Cluster Virtual Adapter Performance Filer dla kart sieciowych .

Sieć dotyczącą backupu trzeba skonfigurować w programie do owego backupu i w przypadku Veeam robimy to jak poniżej:

Jeszcze raz chciałbym uczulić na odseparowanie ruchu dla CSV i HeartBeat od innego ruchu, gdyż wysycenie łącza dla CSV i Heartbeat może doprowadzić do awarii Clustra.

Na zakończenie warto też zaimplementować reguły QoS dla Clustra, jak poniżej:

# Live Migration
New-NetQosPolicy “Live Migration” –LiveMigration –Priority 4
# CSV
New-NetQosPolicy “SMB” –SMB –Priority 5
# HeartBeat
New-NetQosPolicy “HeartBeat” -IPDstPort 3343 –Priority 6
# Wlaczenie na wszystkich interface QoS
get-VMNetworkAdapter -ManagementOS|Set-VMNetworkAdapter -IeeePriorityTag On

Aby sprawdzić, czy nie następuje wysycenie łącza oraz komponentów systemu odpowiedzialnych za komunikacje miedzy-nodową oraz docelowo wyrzucenie jakiegoś węzła z Clustra proponuje użyć oprogramowania iperf i wygenerować ruch multicast. Proszę używać programu iperf skompilowanego natywnie dla windows w wersji 2, gdyż tylko on prawidłowo obsługuje muliticast. iperf-2.0.4-win32.

Na jednym Nodzie proponuje uruchomić komendę:

iperf.exe   -c 224.0.166.111 -u -T 100 -i 1 -b 9000000000 -t 3600

na drugim Nodzie natomiast:

iperf -s -u -B 224.0.166.111 -i 1

Z założenia ruch ten nie powinien odbywać się poprzez sieć dla CSV oraz Heartbeat. Testy możemy powtórzyć z maszyn wirtualnych. Proszę zauważyć, iż w powyższym teście, również obciążamy wirtualnego switcha (o ile dojdzie do niego ruch), gdyż to on musi zmultiplikować ruch multicast do każdej maszyny wirtualnej.

Możemy zintensyfikować testy uruchamiając kolejne instancje oprogramowania iperf dla kolejnych adresów multicast np. 224.0.166.112, 224.0.166.113, 224.0.166.114.

Przy okazji wspomnę, iż powyższy test pomaga zlokalizować bug w kartach sieciowych Intel(R) Ethernet Converged Network Adapter X710 (Driver Version 1.8.94.0, Firmware: Version: 18.5.17), które w przypadku zainstalowania roli Hyper-V, oraz uruchomienia VMQ rozłączają się, co automatycznie powoduje awarie rozwiązania wysokiej dostępności.

Azure Stack – Web + Mobile, Web App – Oops! – Could not create Web App

Zaraz po zainstalowaniu App Service, mimo to iż widzimy w panelu zarządzającym, iż All Roles Ready, jak tutaj:

Powinniśmy do Planów dodać Serwis Microsoft.Web App:

Zaraz potem jeżeli będziemy chcieli wdrożyć Web App to ujrzymy:

Co robić – zalogujmy się za pomocą RDP do cn0-vm, być może trzeba będzie prze edytować Network Security Group i uruchommy Web Cloud Management Console – sprawdźmy, czy wszystkie serwery działają prawidłowo – a ich uruchomienie może zająć chwilkę:

Wróćmy do statuu App Service i tym razem ujrzymy, że nie wszystkie role są uruchomione. W zależności od szybkości naszego sprzętu może to trochę potrwać (w moim około 2 godzin a hosta miałem dość silnego).

Na zakończenie zobaczymy jednak sukces:

A swoją drogą Web Cloud Management Console to dość fajne narzędzie za pomocą, którego mamy kontrolę nad infrastrukturą App Service i chociażby za pomocą jednego kliknięcia możemy połączyć się za pomocą RDP do Publishera:

 

I pamiętajmy, iż nie możemy kreować Web Aplikacji z adminportal, a tylko z poziomu Subskrybcji (np: https://portal.local.azurestack.external/).


Right after installing the App Service, even though we see in the management panel that All Roles Ready, like here:

We should add the Microsoft.Web App to the Plans:

Immediately afterwards, if we want to implement the Web App, we will see it:

What to do?- Just using RDP go to cn0-vm, you may have to edit the Network Security Group and run the Web Cloud Management Console – let’s check that all servers are working properly – and that they may take a while to start:

Let’s go back to the App Service and this time we will see that not all roles are running. Depending on the speed of our equipment, this may take some time (I have to wait about 2 hours):

However, at the end – we will see success:

By the way, Web Cloud Management Console is quite a nice tool that we have control over the App Service infrastructure and even with just one click we can connect via RDP to Publisher:

 

To create web, API, and Azure Functions apps, you must use the tenant portal (eg. https://portal.local.azurestack.external/) not adminportal.

Azure Stack – App Service install problems

Jeżeli podczas instalacji App Service w Azure Stack napotkamy na problemy w szczególności w fazie Deploy App Service, jak poniżej:

Proponuje:

  1. Przejść do Resource Grupy zawierającej App Service w ASDK będzie to AppService.local i w Activity Log sprawdzić, jaki mieliśmy problem.

  2. Zazwyczaj będzie to problem z maszynami wirtualnymi CN0-VM lub CN1-VM, przechodzimy do nich, i w Activity Log sprawdzamy błędy:

  3. Bardziej znaczące logi można uzyskać logując się do tej maszyny za pomocą RDP – wcześniej odpowiednio konfigurując Network Security Group, tak aby przepuścić połączenia RDP i znajdują się one w:

    C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9.1\Status\0.status

  4. Proponuje sprawdzić z tej maszyny czy działa połączenie do bazy danych, która dedykowaliśmy dla App Service za pomocą (oczywiście adres bazy i port podaje jaki przykład):

    Test-NetConnection -ComputerName appservicesql.local.cloudapp.azurestack.external -port 1433

  5. Uruchamiamy Web Cloud Management Console (jest na pulpicie odpowiedni skrót) i potwierdzamy , iż Controller i Management działa prawidłowo:
  6. Otwieramy plik 0.status do edycji i podmieniamy jego zawartość na sukces (w przypadku, kiedy były to błędy typu time-out):[{“status”:{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”name”:”powershell.exe -ExecutionPolicy Unrestricted -Command .\\OnStartAzureVirtualMachineController.ps1″,”operation”:”Command Execution Finished”,”status”:”success”,”substatus”:[{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Waiting for servers to be ready…\\n2017.05.26 04:59:26 —- Servers are ready!\\n2017.05.26 04:59:27 —- All servers are ready!\\n2017.05.26 04:59:27 —- App Service controller installation and configuration has completed successfully.”},”name”:”StdOut”,”status”:”success”},{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:””},”name”:”StdErr”,”status”:”success”}]},”timestampUTC”:”\/Date(1495774767271)\/”,”version”:”1″}]
  7. Wciskamy Retry przy Deploy App Service.

If during the installation of the App Service in Azure Stack we encounter problems in the Deploy App Service phase, as below:

My suggestion is:

  1. Go to the Resource Group containing the App Service (ASDK: AppService.local) and in Activity Log check what problem we had.

  2. Usually this will be a problem with CN0-VM or CN1-VM virtual machines, go to them, and we check errors in Activity Log:

  3. More significant logs can be obtained by logging in to this machine using RDP – previously configuring the Network Security Group to pass the RDP connections. Logs are in:

    C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9.1\Status\0.status

  4. I suggest to the connection to the database – example:
    Test-NetConnection -ComputerName appservicesql.local.cloudapp.azurestack.external -port 1433
  5. We can start the Web Cloud Management Console (there is a shortcut on the desktop) and confirm that the Controller and Management are working properly:
  6. Open 0.status and edit the content to success one (if there was time-out error):[{“status”:{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”name”:”powershell.exe -ExecutionPolicy Unrestricted -Command .\\OnStartAzureVirtualMachineController.ps1″,”operation”:”Command Execution Finished”,”status”:”success”,”substatus”:[{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Waiting for servers to be ready…\\n2017.05.26 04:59:26 —- Servers are ready!\\n2017.05.26 04:59:27 —- All servers are ready!\\n2017.05.26 04:59:27 —- App Service controller installation and configuration has completed successfully.”},”name”:”StdOut”,”status”:”success”},{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:””},”name”:”StdErr”,”status”:”success”}]},”timestampUTC”:”\/Date(1495774767271)\/”,”version”:”1″}]
  7. Press Retry in Deploy App Service.

Identyfikacja błędów w logu instalacyjnym appservice_* / Errors Identyfication in appservice_*:

“code”: “ComponentStatus/StdErr/Succeeded”,

“level”: “Info”,

“displayStatus”: “Provisioning Succeeded”,

“message”: “Wait for servers has timed out\\nAt C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\\\n0\\Common\\common.ps1:457 char:13\\n+ throw New-Object System.TimeoutException \”Wait for server …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : OperationStopped: (:) [], TimeoutException\\n + FullyQualifiedErrorId : Wait for servers has timed out\\n \\nC:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\0\\O\\nnStartAzureVirtualMachineController.ps1 : Error while waiting for server to \\nbecome ready. Exit code: 1.\\nAt line:1 char:1\\n+ .\\OnStartAzureVirtualMachineController.ps1 -controllerIndex 0 -feed h …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep \\n tion\\n + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio \\n n,OnStartAzureVirtualMachineController.ps1\\n ”

}

],

“statuses”: [

{

“code”: “ProvisioningState/failed/1”,

“level”: “Error”,

“displayStatus”: “Provisioning failed”,

“message”: “Finished executing command”

}

]

}

],

“value”: [

{

“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Resources/deployments/AppService.DeployCloud/operations/D8BBEDE893A93B51”,

“operationId”: “D8BBEDE893A93B51”,

“properties”: {

“provisioningOperation”: “Create”,

“provisioningState”: “Failed”,

“timestamp”: “2018-12-29T13:05:33.2421039Z”,

“duration”: “PT1M23.5284416S”,

“trackingId”: “e3607fe5-a29d-474a-a1c0-91c02719ee72”,

“serviceRequestId”: “3b1547a6-4eba-4ab5-8202-670f250698ab”,

“statusCode”: “Conflict”,

“statusMessage”: {

“status”: “Failed”,

“error”: {

“code”: “ResourceDeploymentFailure”,

“message”: “The resource operation completed with terminal provisioning state ‘Failed’.”,

“details”: [

{

“code”: “VMExtensionProvisioningError”,

“message”: “VM has reported a failure when processing extension ‘OnStart’. Error message: Finished executing command”

}

]

}

},

“targetResource”: {

“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Compute/virtualMachines/CN0-VM/extensions/OnStart”,

“resourceType”: “Microsoft.Compute/virtualMachines/extensions”,

“resourceName”: “CN0-VM/OnStart”

}

}

},

{

“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Resources/deployments/AppService.DeployCloud/operations/6A1B090ABDF12ECD”,

“operationId”: “6A1B090ABDF12ECD”,

“properties”: {

“provisioningOperation”: “Create”,

“provisioningState”: “Succeeded”,

“timestamp”: “2018-12-29T11:40:15.9086899Z”,

“duration”: “PT1M3.229514S”,

“trackingId”: “d094b163-33bf-45d6-99a9-5bc4e3d3889a”,

“serviceRequestId”: “f3b8fecc-740c-4224-9615-36d8036af988”,

“statusCode”: “OK”,

“targetResource”: {

“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Compute/virtualMachines/CN1-VM/extensions/OnStart”,

“resourceType”: “Microsoft.Compute/virtualMachines/extensions”,

“resourceName”: “CN1-VM/OnStart”

}

}

[{“version”:”1″,”timestampUTC”:”2018-12-29T13:03:34.4429755Z”,”status”:{“name”:”SecureCommand_0″,”operation”:”Command Execution Finished”,”status”:”error”,”code”:1,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”substatus”:[{“name”:”StdOut”,”status”:”success”,”code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”—- Waiting for servers to be ready…\\n2018.12.29 11:58:31 —- Waiting for servers to be ready…\\n2018.12.29 11:59:31 —- Waiting for servers to be ready…\\n2018.12.29 12:00:31 —- Waiting for servers to be ready…\\n2018.12.29 12:01:31 —- Waiting for servers to be ready…\\n2018.12.29 12:02:31 —- Waiting for servers to be ready…\\n2018.12.29 12:03:31 —- Waiting for servers to be ready…\\n2018.12.29 12:04:31 —- Waiting for servers to be ready…\\n2018.12.29 12:05:31 —- Waiting for servers to be ready…\\n2018.12.29 12:06:31 —- Waiting for servers to be ready…\\n2018.12.29 12:07:31 —- Waiting for servers to be ready…\\n2018.12.29 12:08:31 —- Waiting for servers to be ready…\\n2018.12.29 12:09:31 —- Waiting for servers to be ready…\\n2018.12.29 12:10:31 —- Waiting for servers to be ready…\\n2018.12.29 12:11:31 —- Waiting for servers to be ready…\\n2018.12.29 12:12:31 —- Waiting for servers to be ready…\\n2018.12.29 12:13:31 —- Waiting for servers to be ready…\\n2018.12.29 12:14:31 —- Waiting for servers to be ready…\\n2018.12.29 12:15:31 —- Waiting for servers to be ready…\\n2018.12.29 12:16:31 —- Waiting for servers to be ready…\\n2018.12.29 12:17:31 —- Waiting for servers to be ready…\\n2018.12.29 12:18:31 —- Waiting for servers to be ready…\\n2018.12.29 12:19:31 —- Waiting for servers to be ready…\\n2018.12.29 12:20:31 —- Waiting for servers to be ready…\\n2018.12.29 12:21:31 —- Waiting for servers to be ready…\\n2018.12.29 12:22:31 —- Waiting for servers to be ready…\\n2018.12.29 12:23:31 —- Waiting for servers to be ready…\\n2018.12.29 12:24:31 —- Waiting for servers to be ready…\\n2018.12.29 12:25:31 —- Waiting for servers to be ready…\\n2018.12.29 12:26:31 —- Waiting for servers to be ready…\\n2018.12.29 12:27:31 —- Waiting for servers to be ready…\\n2018.12.29 12:28:31 —- Waiting for servers to be ready…\\n2018.12.29 12:29:31 —- Waiting for servers to be ready…\\n2018.12.29 12:30:31 —- Waiting for servers to be ready…\\n2018.12.29 12:31:31 —- Waiting for servers to be ready…\\n2018.12.29 12:32:31 —- Waiting for servers to be ready…\\n2018.12.29 12:33:31 —- Waiting for servers to be ready…\\n2018.12.29 12:34:31 —- Waiting for servers to be ready…\\n2018.12.29 12:35:31 —- Waiting for servers to be ready…\\n2018.12.29 12:36:31 —- Waiting for servers to be ready…\\n2018.12.29 12:37:32 —- Waiting for servers to be ready…\\n2018.12.29 12:38:32 —- Waiting for servers to be ready…\\n2018.12.29 12:39:32 —- Waiting for servers to be ready…\\n2018.12.29 12:40:32 —- Waiting for servers to be ready…\\n2018.12.29 12:41:32 —- Waiting for servers to be ready…\\n2018.12.29 12:42:32 —- Waiting for servers to be ready…\\n2018.12.29 12:43:32 —- Waiting for servers to be ready…\\n2018.12.29 12:44:32 —- Waiting for servers to be ready…\\n2018.12.29 12:45:32 —- Waiting for servers to be ready…\\n2018.12.29 12:46:32 —- Waiting for servers to be ready…\\n2018.12.29 12:47:32 —- Waiting for servers to be ready…\\n2018.12.29 12:48:32 —- Waiting for servers to be ready…\\n2018.12.29 12:49:32 —- Waiting for servers to be ready…\\n2018.12.29 12:50:32 —- Waiting for servers to be ready…\\n2018.12.29 12:51:32 —- Waiting for servers to be ready…\\n2018.12.29 12:52:32 —- Waiting for servers to be ready…\\n2018.12.29 12:53:32 —- Waiting for servers to be ready…\\n2018.12.29 12:54:32 —- Waiting for servers to be ready…\\n2018.12.29 12:55:32 —- Waiting for servers to be ready…\\n2018.12.29 12:56:32 —- Waiting for servers to be ready…\\n2018.12.29 12:57:32 —- Waiting for servers to be ready…\\n2018.12.29 12:58:32 —- Waiting for servers to be ready…\\n2018.12.29 12:59:32 —- Waiting for servers to be ready…\\n2018.12.29 01:00:32 —- Waiting for servers to be ready…\\n2018.12.29 01:01:32 —- Waiting for servers to be ready…\\n2018.12.29 01:02:32 —- Waiting for servers to be ready…\\n2018.12.29 01:03:33 —- Error while waiting for server to become ready. Exit code: 1.\\n\\n”}},{“name”:”StdErr”,”status”:”success”,”code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Wait for servers has timed out\\nAt C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\\\n0\\Common\\common.ps1:457 char:13\\n+ throw New-Object System.TimeoutException \”Wait for server …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : OperationStopped: (:) [], TimeoutException\\n + FullyQualifiedErrorId : Wait for servers has timed out\\n \\nC:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\0\\O\\nnStartAzureVirtualMachineController.ps1 : Error while waiting for server to \\nbecome ready. Exit code: 1.\\nAt line:1 char:1\\n+ .\\OnStartAzureVirtualMachineController.ps1 -controllerIndex 0 -feed h …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep \\n tion\\n + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio \\n n,OnStartAzureVirtualMachineController.ps1\\n “}}]}}]

Azure Active Directory – Synchronizacja pojedynczego konta, Sprawdzenie synchronizacji, Synchronization of a single account, Checking the synchronization

Jeżeli chcemy sprawdzić stan synchronizacji lub synchronizować jedno konto z Lokalnego Active Directory z Azure Active Directory, logujemy się na maszynę gdzie mamy zainstalowany Azure Ad Connect i uruchamiamy Synchronization Service (“C:\Program Files\Microsoft Azure AD Sync\UIShell\miisclient.exe”).

Widzimy tutaj wszystkie uruchomienia synchronizacji i ewentualnie możemy wejść w detale, aby poznać co kiedy się synchronizowało wraz z ewentualnymi błędami.

Jeżeli chcemy dokonać synchronizacji tylko jednego obiektu np. w celu sprawdzenia błędów, bądź aktualizacji atrybutów, należy go wyszukać – jak poniżej:

Następnie wybieramy Preview, Generate Preview gdzie możemy zapoznać się z ewentualnymi problemami, błędami i ewentualnie Commit Preview i wówczas następuje synchronizacja obiektu.

Na marginesie wspomnę, iż kilka razy obiekt w wypadku użycia PowerShellowej komendy Start-ADSyncSyncCycle -PolicyType Delta nie synchronizował się – albo był w “dziwnym stanie”, a zastosowanie powyższej procedury rozwiązało problem.


If we want to check the synchronization status or synchronize one account from the Local Active Directory with Azure Active Directory, log on to the machine where we have Azure Ad Connect installed and run the Synchronization Service (“C:\Program Files\Microsoft Azure AD Sync\UIShell\miisclient.exe”).

We can see here all the synchronization events and eventually we can go into details to find out what happened when it synchronized with possible errors.

We can synchronize only one object, for example to check for errors or update attributes, you should search for it – as below:

Then choose Preview, Generate Preview where we can see any problems, errors and finally we can press Commit Preview to synchronize the object.

By the way, I will mention that in this way I synchronize the objects that was in a “strange state”, and Start-ADSyncSyncCycle -PolicyType Delta do not fix them.

Azure Stack – ‘Name’ cannot be found on this object. or The SafeOS must be running Windows Server 2016 or Windows 10

Jeżeli podczas uruchamiania pliku .\asdk-installer.ps1 natrafimy na poniższy błąd:

The property ‘Name’ cannot be found on this object. Verify that the property exists and can be set.
At C:\AzureStack_Installer\asdk-installer.ps1:1755 char:1
+ $Runspace_Jobs_Properties.Name = “Jobs”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

Oznacza to iż, nie mamy zainstalowanego Windows Management Framework 5.1 – wystarczy go zainstalować i uruchomić instalacje raz jeszcze.

W przypadku błędu:

F_Initialize : The SafeOS must be running Windows Server 2016 or Windows 10 to use the ASDK Installer. Consider upgrading
the SafeOS or use PowerShell to install the ASDK
https://docs.microsoft.com/en-us/azure/azure-stack/asdk/asdk-deploy-powershell
At C:\AzureStack_Installer\asdk-installer.ps1:2802 char:1
+ F_Initialize

Komentujemy linię 1853 i wówczas Azure Stack możemy zainstalować nawet z Windows 8.1 lub Windows 2012 R2.


During running .\asdk-installer.ps1 in case of error:

The property ‘Name’ cannot be found on this object. Verify that the property exists and can be set.
At C:\AzureStack_Installer\asdk-installer.ps1:1755 char:1
+ $Runspace_Jobs_Properties.Name = “Jobs”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

It means that we have not installed Windows Management Framework 5.1 – so please install it.

In case of error:

F_Initialize : The SafeOS must be running Windows Server 2016 or Windows 10 to use the ASDK Installer. Consider upgrading
the SafeOS or use PowerShell to install the ASDK
https://docs.microsoft.com/en-us/azure/azure-stack/asdk/asdk-deploy-powershell
At C:\AzureStack_Installer\asdk-installer.ps1:2802 char:1
+ F_Initialize

Please comment line 1853 then we can install Azure Stack from Windows 8.1 or Windows 2012 R2.

Uzyskanie praw Global Administratora / How to get Global Administrator rights

Ze względu na specyfikę działania serwisów chmurowych Microsoft oraz samego działania Azure Active Directory może się zdarzyć, iż będziemy mieli dostęp do usługi katalogowej w Azure, w której nie mamy praw Global Admina. O ile w pierwszym momencie korzystania zwłaszcza z obcych usług, może nam to nie przeszkadzać, ale jeżeli będziemy adoptować nowe usługi chmurowe Microsoft okaże się to uciążliwe, a może i niezbędne – np. przy zarządzaniu kontem partnerskim Microsoft. Przy okazji warto zapoznać się z tym wpisem opisującym doświadczalnie zachowanie się Azure Active Directory.

Jak więc uzyskać uprawnienia Global Administratora:

  1. Logujemy się do portal.azure.com i przechodzimy do Azure Acctive Directory i All users. Jak widzimy nie mamy żadnego użytkownika z uprawnieniami Global Administratora.
  2. Zalogujemy się do strony https://powerbi.com/ i wybierzmy START FREE i TRY FREE
  3. Tutaj przy logowaniu prawdopodobnie wyświetli się opcja, iż mamy już konto w Azure Active Directory dlatego zalogujmy się do tego konta, ale już poprzez witrynę office.com
  4. Po wciśnięciu Admin powinniśmy otrzymać screen jak poniżej:
  5. Tutaj już sprawa prosta wciskamy opcje chcę być administratorem i dalej prawdopodobnie będziemy musieli weryfikować fakt bycia administratorem domeny internetowej, a więc będziemy musieli do rekordów domeny dodać rekord TXT. Gdy tylko to zrobimy staniemy się Administratorem Globalnym, wystarczy wylogować się i zalogować ponownie.


    Due to the specifics of the operation of Microsoft cloud services and the Azure Active Directory itself, it may happen that we will have access to theAzure Active Directory, in which we do not have Global Admin rights. While in the first moment of using especially foreign services, it may not disturb us, but if we adopt new Microsoft cloud services, it will be cumbersome, and sometime it is necessary to have Global Administrator Rights – for an example when managing a Microsoft partner account. By the way, please also read this article.

    So how do you get the Global Administrator privileges:

    1. Log to the portal.azure.com  and go to Azure Acctive Directory and All users. As we see we do not have Global Administrator Rights..
    2. Log to https://powerbi.com/ and choose START FREE and TRY FREE
    3. Here you will probably see the message that you already have an account in Azure Active Directory, so log in to this account, but now via office.com
    4. After pressing Admin, we should get a screen like this (Would you like to become administrator):
    5. We are almost at home just presy Yes and you will probably have to verify the internet domain by adding TXT record to the domain records. As soon as you do, you will become a Global Administrator, simply log out and log in again.

Powyższa procedura przydatna podczas napotkania komunikatów/ The above procedure is useful when encountering messages:

We have moved MPN membership management from Partner Membership Center (PMC) to the Partner Center—the single destination to manage your business relationship with Microsoft. After you move, you’ll maintain existing benefits and have access to additional tools such as customer referrals and go-to-market services​

To continue using your membership benefits, you need to move your account now.

Welcome to Partner Center!
To make it easier for you to manage and grow your business, we’re consolidating features and functions that are currently spread across separate sites onto one platform, the Microsoft Partner Center portal.
To successfully move your data from Partner Membership Center and create an account for Partner Center, you’ll need to have on hand the following information. You may want to take a few minutes to gather these items before you get started:
Global administrator credentials for your work account
You’ll need to provide the user name and password you use to sign into Office 365, Microsoft Azure, or Microsoft Dynamics CRM. If you don’t have a work account, you can create one during the enrollment process.
Your organization’s legal business name, address, primary contact, and support details
We need this information to confirm that your organization has an established profile with Microsoft and that you are authorized to act on its behalf.
Authority to sign the agreement
Ensure that you are authorized to sign legal agreements on your organization’s behalf as you’ll be asked to do so during the enrollment process.
We’ll verify the information you provided.

Azure Stack – step 60.120 failed, name could not be resolved login.microsoftonline.com, problemy z siecią/network problems

W czasie wdrażania Azure Stack możemy spotkać błąd typu:

Invoke-EceAction : Action: Invocation of step 60.120 failed. Stopping invocation of action plan.

Pierwszym krokiem będzie ponowne uruchomienie instalatora:

cd C:\CloudDeployment\Setup
PS C:\CloudDeployment\Setup> .\InstallAzureStackPOC.ps1 -rerun

Po-czym zapewne zobaczymy:

Invoke-EceAction : Action: Invocation of step 60 failed. Stopping invocation of action plan.
At C:\CloudDeployment\Setup\DeploySingleNode.ps1:809 char:5
+ Invoke-EceAction -RolePath $masterRole -ActionType $actionPlan @d …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-EceAction], ActionExecutionException
+ FullyQualifiedErrorId : Unspecified error,CloudEngine.Cmdlets.InvokeCmdlet

Bardzo często świadczy, to o problemach sieciowych – zwłaszcza, że instalator w tym zakresie nie jest precyzyjny, a my nie-czytając dokumentacji podajemy błędne parametry sieci dla BGPNAT.

Jeżeli przejdziemy troszkę do góry w logu zobaczymy prawdopodobnie problem z rozwiązywaniem nazwy login.microsoftonline.com

 

Możemy jeszcze zweryfikować i sprawdzić wydając polecenie:

PS C:\CloudDeployment\Setup> ping login.microsoftonline.com
Ping request could not find host login.microsoftonline.com. Please check the name and try again.

 

Jak rozwiązać tego typu problem.

Sprawdzić czy prawidłowo ustawiony jest forwarder w DNS na maszynie AzS-DC01 (Uruchamiamy Hyper-V managera i możemy się do niej zalogować używając loginu azurestack\AzureStackAdmin). Niestety jest to maszyna Windows Server Core więc działamy z PowerShella.
Jeżeli tego nie lubimy na naszej głównej maszynie (tej uruchomionej z CloudBuilder.vhdx) uruchamiamy mmc i dodajemy przystawkę DNS i łączymy się z AzS-DC01.azurestack.local i sprawdzamy ustawienia DNS.

Jak widać ustawione mamy, aby w przypadku braku połączenia do Forwardera używał RootHintsów, więc raczej to nie jest to, chyba, że mamy zablokowane odpytywanie zewnętrznych DNSów (UDP/TCP port 53).

Bardziej prawdopodobne, że mamy źle skonfigurowanego NATa na maszynie AzS-BGPNAT01 – w moim przypadku po wydaniu ipconfig oczom ujrzał mi się wpis:

No właśnie – mamy dla interface zewnętrznego przyporządkowany adres 172.25.229.0 !!! Założeniem było, że nasza sieć będzie miała adres 172.25.229.0/24, a pierwszy host to 172.25.229.1. Tak więc musimy zmienić nie tylko adres IP karty Ethernet, ale także reguły NATowania – jak to robimy:

get-netnat #wyświetlamy NATa
Get-NetNat|Remove-NetNat #musimy skasować NATa, bo nie możemy rekonfigurować adresu zewnętrznego
Netsh interface ipv4 set address “ethernet” static 172.25.229.1 255.255.255.0 172.25.229.254 #Ustawiamy nowy adres ip, pamiętajmy, aby to robić po skasowaniu NATa – w przyciwnym wypadku nam się nie uda skasować NATa.
New-NetNat -Name “BGPNAT” -ExternalIPInterfaceAddressPrefix 172.16.229.0/24 #Robimy nowego NATa
Add-NetNatExternalAddress -NatName “BGPNAT” -IPaddress 172.25.229.1 -PortStart 5000 -PortEnd 49151

I od tego momentu powinniśmy móc wykonać ping na 8.8.8.8, a z innych hostów powinićmy móc wykonać ping dns.pl

Powyższej procedury można używać też do zmieniania zewnętrznego adresu ip – aczkolwiek nie jest to cała procedura.


During the implementation of Azure Stack, we can encounter an error of the type:

Invoke-EceAction : Action: Invocation of step 60.120 failed. Stopping invocation of action plan.

The first step will be to restart the installer:

cd C:\CloudDeployment\Setup
PS C:\CloudDeployment\Setup> .\InstallAzureStackPOC.ps1 -rerun

That propably finish with this:

Invoke-EceAction : Action: Invocation of step 60 failed. Stopping invocation of action plan.
At C:\CloudDeployment\Setup\DeploySingleNode.ps1:809 char:5
+ Invoke-EceAction -RolePath $masterRole -ActionType $actionPlan @d …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-EceAction], ActionExecutionException
+ FullyQualifiedErrorId : Unspecified error,CloudEngine.Cmdlets.InvokeCmdlet

It seems to be a network problem – especially with configuration of BGPNAT and we will probaly find in our output something similar to “could not be resolved login.microsoftonline.com”.

 

We can verify network problems with:

PS C:\CloudDeployment\Setup> ping login.microsoftonline.com
Ping request could not find host login.microsoftonline.com. Please check the name and try again.

 

How to resolve this type of problem.

Check if the forwarder is correctly set in DNS on the AzS-DC01 machine (We can run the Hyper-V manager and we can log in to it using the azurestack\AzureStackAdmin login). Unfortunately, this is a Windows Server Core machine, so we have to use PowerShell.
If you do not like it on our main machine (this one launched from CloudBuilder.vhdx), run mmc and add the DNS snap-in and connect to AzS-DC01.azurestack.local and check the DNS settings.

 

As you can see, we use RootHints in the absence of connection to the Forwarder, so this is probably not the case, unless we have blocked external DNS polling (UDP / TCP port 53).

More likely, we have a wrongly configured NAT on the AzS-BGPNAT01 machine – in my case, after the release of ipconfig, I saw an entry:

 

We have an address for the external interface 172.25.229.0 !!! The assumption was that our network should have the address 172.25.229.0/24, and the first host is 172.25.229.1. So we have to change not only the IP address of the Ethernet card, but also the NAT rule – how we do it:

get-netnat #display NAT
Get-NetNat|Remove-NetNat #we need to delete NAT – we can not reconfigure external address
Netsh interface ipv4 set address “ethernet” static 172.25.229.1 255.255.255.0 172.25.229.254 #Set a new ip address, in order to delete NAT the adress should match.
New-NetNat -Name “BGPNAT” -ExternalIPInterfaceAddressPrefix 172.16.229.0/24 #create a new NATa
Add-NetNatExternalAddress -NatName “BGPNAT” -IPaddress 172.25.229.1 -PortStart 5000 -PortEnd 49151

 And from that moment we should be able to ping on 8.8.8.8, and from other hosts we should be able to ping dns.pl.

The above procedure can also be used to change the external IP address – although this is not the entire procedure.

 

Konfiguracja uwierzytelnienia z wykorzystaniem Azure Active Directory w Apache / Apache and Azure Active Directory OpenID – Oauth

Ostatnio nadarzyła mi się konieczność skonfigurowania uwierzytelnienia z wykorzystaniem Azure Active Directory w Apache. Na przykładzie CentOs podaje jak to zrobić z wykorzystaniem OpenID / Oauth.

Instalujemy Apche oraz przykładowe komponenty wykorzystywane do testów:

yum -y install httpd
yum -y install mod_ssl
yum -y install php
yum -y install mc

Startujemy Apache wraz z ustawieniem autostartu serwisu:

systemctl enable httpd.service
systemctl start httpd.service

Do /var/www/html/ wrzucami przykładową stronę w php:

<?php
phpinfo();
?>

Proponuje, zainstalować certyfikat SSL testowy z wykorzystaniem narzędzia http://ssl4ip.westeurope.cloudapp.azure.com/ oraz DigiCert Util, aby wyeksportować .pfx do .cer i .key. Wstawiamy certyfikat dla naszej strony, a następnie w tym samym pliku pośrednie centrum certyfikacji i klucz prywatny do odpowiednich plików:

vi /etc/pki/tls/private/localhost.key
vi /etc/pki/tls/certs/localhost.crt
service httpd restart

Na pierwsze testy włączamy uwierzytelnianie Basic:

cd /var/www/html
touch .htpasswd
htpasswd .htpasswd a
I podajemy hasło np. a

Kreujemy plik .htaccess:

vi /var/www/html/.htpasswd

o treści:

AuthType Basic
AuthName “Azure Active Directory”
AuthUserFile /var/www/html/.htpasswd
Require valid-user

Jeszcze musimy prze-konfigurować Apache, aby akceptował nadpisywanie zmian z plików .htaccess:

vi /etc/httpd/conf/httpd.conf

i zmieniamy wszędzie z AllowOverride none na AllowOverride All, a na koniec restartujemy Apache:

service httpd restart

Od tego momentu powinniśmy wejść na stronę np.: https://213-199-133-54.h.com.pl, gdzie 213.199.133.54 to ip naszego serwera z Apache – wykorzystujemy DNS i certyfikat z http://ssl4ip.westeurope.cloudapp.azure.com/.

Po podaniu loginu ja hasła powinniśmy dostać się do strony. To teraz trzeba prze-konfigurować funkcjonalność, tak aby do tego celu wykorzystywać Azure Active Directory.

Instalujemy pakiet mod_auth_openidc:

yum install mod_auth_openidc
repoquery -l mod_auth_openidc

w pliku (vi /etc/httpd/conf.d/auth_openidc.conf) dodajemy:

OIDCProviderMetadataURL https://login.microsoftonline.com/2f5c0b12-3c26-4d04-9c4f-22b2dc35c /v2.0/.well-known/openid-configuration
# OIDCRedirectURI is a vanity URL that must point to a path protected by this module but must NOT point to any content
OIDCRedirectURI https://213-199-133-54.h.com.pl/a
OIDCCryptoPassphrase random1234
OIDCClientID 5ed1690e-b7d1-48b8-9eae-bcad7ddad
OIDCClientSecret WGxILH2Rk2IgTx5YwYHH7Sxpit4yrUDTQ=

Gdzie:

2f5c0b12-3c26-4d04-9c4f-22b2dc35c – Id Tenant’u Azure Active Directory
https://213-199-133-54.h.com.pl/a – przekierowanie po powrocie – katalog, a nie musi istnieć, ale tutaj wrócimy np. z błędem uwierzytelnienia
5ed1690e-b7d1-48b8-9eae-bcad7ddad – Id Aplikacji z Azure Active Directory
WGxILH2Rk2IgTx5YwYHH7Sxpit4yrUDTQ= – secret – dodany w portalu w danej aplikacji.

Na zakończenie zmieniamy /var/www/html/.htaccess na:

AuthType openid-connect
Require valid-user

I wydajemy service httpd restart i uwierzytelnianie z wykorzystaniem Azure Active Directory już działa.

Możemy skonfigurować, że użytkownik musi mieć nadane uprawnienia, aby skorzystać z danej aplikacji.
Być może wkrótce Video Step by Step jak to wszystko zrobić, gdyż jeden obraz mówi więcej niż tysiące słów – a co dopiero Video.


Recently, I have to configure authentication using Azure Active Directory in Apache. How to do it using CentOs 7.5 using OpenID / Oauth.

First step is to install Apache and some other components:

yum -y install httpd
yum -y install mod_ssl
yum -y install php
yum -y install mc

Start Apache and set it to autostart:

systemctl enable httpd.service
systemctl start httpd.service

Put to /var/www/html/ sample webpage:

<?php
phpinfo();
?>

I suggest installing a test SSL certificate using the tool from http://ssl4ip.westeurope.cloudapp.azure.com/ and DigiCert Util to export .pfx to .cer / .key. We insert the certificate for our site and then in the same file the intermediate certificate and the private key to the appropriate files::

vi /etc/pki/tls/private/localhost.key
vi /etc/pki/tls/certs/localhost.crt
service httpd restart

At the beginning lets test with Basic Authentication:

cd /var/www/html
touch .htpasswd
htpasswd .htpasswd a

and provide password.

Please create .htaccess file:

vi /var/www/html/.htpasswd

with:

AuthType Basic
AuthName “Azure Active Directory”
AuthUserFile /var/www/html/.htpasswd
Require valid-user

Please reconfigure Apache:

vi /etc/httpd/conf/httpd.conf

replace everywhere from AllowOverride none to AllowOverride All, and restart Apache:

service httpd restart

From that moment, we should go to the site, for example: https://213-199-133-54.h.com.pl, where 213.199.133.54 is the IP of our server with Apache – we use DNS and the certificate from http: // ssl4ip. westeurope.cloudapp.azure.com/.

After entering the login password, we should get to the site. It is now necessary to reconfigure the functionality so that Azure Active Directory can be used for this purpose.

Please install mod_auth_openidc:

yum install mod_auth_openidc
repoquery -l mod_auth_openidc

Add to /etc/httpd/conf.d/auth_openidc.conf:

OIDCProviderMetadataURL https://login.microsoftonline.com/2f5c0b12-3c26-4d04-9c4f-22b2dc35c /v2.0/.well-known/openid-configuration
# OIDCRedirectURI is a vanity URL that must point to a path protected by this module but must NOT point to any content
OIDCRedirectURI https://213-199-133-54.h.com.pl/a
OIDCCryptoPassphrase random1234
OIDCClientID 5ed1690e-b7d1-48b8-9eae-bcad7ddad
OIDCClientSecret WGxILH2Rk2IgTx5YwYHH7Sxpit4yrUDTQ=

Where:

2f5c0b12-3c26-4d04-9c4f-22b2dc35c – Azure Azctive Directory Tenant ID
https://213-199-133-54.h.com.pl/a – redirection on the return – a directory, does not have to exist, but here we will return, eg with an authentication error
5ed1690e-b7d1-48b8-9eae-bcad7ddad – Application ID from Azure Active Directory
WGxILH2Rk2IgTx5YwYHH7Sxpit4yrUDTQ= – secret – added in the portal in the given application.

Modify /var/www/html/.htaccess to:

AuthType openid-connect
Require valid-user

And we release service httpd restart and authentication using Azure Active Directory is already working.

We can configure that the user must be granted permission to use the application.
Maybe soon I will record Step by Step Video how to do it.


Some screenshot / Kilka obrazków poglądowych:

 

 

 

 

 

 

 

 

 

 

Testowi użytkownicy w nowej domenie Active Directory

Czasami musimy w celach testowych uruchomić Active Directory. Warto by zasilić nowo postawiona instancję kilkoma użytkownikami. W poniższym linku znajduje się skrypt, który bardzo ładnie to robi i zasysa użytkowników z pliku CSV, co może być przydatne również przy wgrywaniu realnych użytkowników do nowo postawionej domeny.


Sometimes we need to run Active Directory for testing purposes. It’s worth to fill the new instance up with several users. The following link contains a script that import users from a CSV file, which can also be useful when uploading real users to a newly created domain.

Script:

https://gallery.technet.microsoft.com/scriptcenter/Create-UsersGroup-for-9ee1de26

Android, iOS, oSX, Windows – Apache Cordova / Azure

Apache Cordova to narzędzie za pomocą, którego możemy za jednym zamachem pisać aplikacje (zazwyczaj biznesową) i kompilować ją dla:

  • android
  • browser
  • ios
  • osx
  • windows ~6.0.0

Mamy też wsparcie dla Azure.

Proces instalacji opisany jest na głównej stronie projektu, a stworzenie nowej aplikacji ogranicza się do wydania komend:

  • npm install -g cordova (instalacja)
  • cordova create MyApp
  • cd MyApp
  • cordova platform list
  • cordova platform add browser
  • cordova platform add android
  • cordova run browser

lub

  • cordova build android

 

Jeżeli naszą platformą wyjściową ma być Android wówczas należy postępować wg: https://cordova.apache.org/docs/en/8.x/guide/platforms/android/index.html

 

Z tego co zauważyłem lepiej radzi sobie wersja pod Linux (ze względu na wykorzystane produktu np. Gradle). Jeżeli nie mamy Linux’a pod ręką polecam zapoznać się z tym artykułem.

Najbardziej uciążliwą rzeczą jest ustawienie odpowiednich ścieżek i zmiennych środowiskowych (Błąd No installed build tools found. Install the Android build tools version 19.1.0 or higher). Poniżej lista dla Linux i Windows przy kompilacjach dla platformy Android i zainstalowaniu Android Studio dla użytkownika mf:

  • PATH=$PATH:/opt/jdk1.8.0_191/bin
  • PATH=$PATH:/opt/android-studio/bin
  • PATH=$PATH:/home/mf/Android/Sdk/platform-tools
  • PATH=$PATH:/home/mf/Android/Sdk/build-tools/28.0.3
  • PATH=$PATH:/home/mf/Android/Sdk/tools
  • PATH=$PATH:/home/mf/Android/Sdk/tools/bin
  • JAVA_HOME=/opt/jdk1.8.0_191/
  • export JAVA_HOME
  • ANDROID_HOME=/home/mf/Android/Sdk/
  • export ANDROID_HOME

 

  • Path=
  • C:\Users\mf\AppData\Local\Android\Sdk\build-tools\28.0.3
  • C:\jdk1.8.0_191\bin;C:\Program Files\nodejs\
  • C:\Program Files\Android\Android Studio\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\tools
  • C:\Users\mf\AppData\Local\Android\Sdk\platform-tools
  • C:\Program Files\Android\Android Studio\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\emulator
  • C:\Users\mf\AppData\Local\Android\Sdk\tools\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\tools\proguard\bin
  • C:\Users\mf\scoop\shims;C:\Users\mf\AppData\Local\Microsoft\WindowsApps
  • C:\Users\mf\AppData\Roaming\npm
  • ANDROID_HOME=C:\Users\mf\AppData\Local\Android\Sdk
  • ANDROID_STUDIO=C:\Program Files\Android\Android Studio
  • APPDATA=C:\Users\mf\AppData\Roaming
  • JAVA_HOME=C:\jdk1.8.0_191

Jeżeli napotkamy na błędy:

Minimum supported Gradle version is 4.4. Current version is 4.1.

polecam skorzystać z wersji dla Linux, lub stosować ten artykuł.


Apache Cordova is a fantastic tool that can compile applications for:

  • android
  • browser
  • ios
  • X-axis
  • windows ~ 6.0.0

We also have Azure support:

The installation process is described on the main project page and the creation of a new application is limited to issuing following commands:

  • npm install -g cordova (instalacja)
  • cordova create MyApp
  • cd MyApp
  • cordova platform list
  • cordova platform add browser
  • cordova platform add android
  • cordova run browser

or

  • cordova build android

 

If our destination platform is Android we should follow: https://cordova.apache.org/docs/en/8.x/guide/platforms/android/index.html

I noticed, that the Linux version works better (due to the product used, eg Gradle). If we do not have Linux at hand, I recommend reading this post.

The most troublesome thing is to set the right environment paths and variables (error: No installed build tools found. Install the Android build tools version 19.1.0 or higher). Below is a list for Linux and Windows on the compilations for the Android platform and the installation of Android Studio for the mf user:

  • PATH=$PATH:/opt/jdk1.8.0_191/bin
  • PATH=$PATH:/opt/android-studio/bin
  • PATH=$PATH:/home/mf/Android/Sdk/platform-tools
  • PATH=$PATH:/home/mf/Android/Sdk/build-tools/28.0.3
  • PATH=$PATH:/home/mf/Android/Sdk/tools
  • PATH=$PATH:/home/mf/Android/Sdk/tools/bin
  • JAVA_HOME=/opt/jdk1.8.0_191/
  • export JAVA_HOME
  • ANDROID_HOME=/home/mf/Android/Sdk/
  • export ANDROID_HOME

 

  • Path=
  • C:\Users\mf\AppData\Local\Android\Sdk\build-tools\28.0.3
  • C:\jdk1.8.0_191\bin;C:\Program Files\nodejs\
  • C:\Program Files\Android\Android Studio\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\tools
  • C:\Users\mf\AppData\Local\Android\Sdk\platform-tools
  • C:\Program Files\Android\Android Studio\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\emulator
  • C:\Users\mf\AppData\Local\Android\Sdk\tools\bin
  • C:\Users\mf\AppData\Local\Android\Sdk\tools\proguard\bin
  • C:\Users\mf\scoop\shims;C:\Users\mf\AppData\Local\Microsoft\WindowsApps
  • C:\Users\mf\AppData\Roaming\npm
  • ANDROID_HOME=C:\Users\mf\AppData\Local\Android\Sdk
  • ANDROID_STUDIO=C:\Program Files\Android\Android Studio
  • APPDATA=C:\Users\mf\AppData\Roaming
  • JAVA_HOME=C:\jdk1.8.0_191

If we found this kind of errors:

Minimum supported Gradle version is 4.4. Current version is 4.1.

I suggest to use Linux version, or read these posts.

Remote Desktop to Linux

Na co dzień, na komputerze desktop pracuje używając systemu Windows – czasami jednak potrzebuje oprogramowanie, które działa (np. bezbłędnie) tylko na linux. O ile oprogramowanie to działa w powłoce (shell), wystarczy dostęp do dowolnego systemu Linux poprzez SSH i uruchomienie oprogramowania. Gorzej, gdy potrzebujemy Graficznego Interface Użytkownika (GUI). I tym razem Azure może przyjść nam z pomocą – wystarczy wdrożyć, np. Ubuntu 18.10 i następnie wydać następujące polecenia:

apt-get -y update
apt-get -y install tasksel
tasksel install ubuntu-desktop
apt-get -y install xrdp
systemctl enable xrdp
service xrdp stop
echo xfce4-session >~/.xsession
service xrdp start
service xrdp status

Od tego momentu możemy z Linux połączyć się graficznie za pomocą oprogramowania Remote Desktop.

Usually I am using Windows based desktop Sometime I need to run software that works (without errors) only on Linux. If the software works in the shell, all you need is access to any Linux system via SSH and run the software. Worse, when we need Graphical User Interface (GUI). Using Azure we can launch for an example, Ubuntu 18.10 and then issue the following commands:

apt-get -y update
apt-get -y install tasksel
tasksel install ubuntu-desktop
apt-get -y install xrdp
systemctl enable xrdp
service xrdp stop
echo xfce4-session> ~ /.xsession
service xrdp start
service xrdp status

From that moment, we can connect graphically with Linux using the Remote Desktop software.

Rozwiązywanie konfliktów synchronizacji AD Connect / Resolving AD Connect synchronization conflicts / ImmutableID

Jeżeli korzystamy z oprogramowania AD Connect do synchronizacji kont lokalnego Active Directory, a wcześniej mieliśmy założone jakiś konta w Azure Active Directory, wówczas wcześniej czy później spotkamy się z konfliktem założenia konta w Azure Active Directory na podstawie konta Active Directory. Zdarzy się to w przypadku, kiedy mamy identyczny UPN w Active Directory i azłożymy konto w Azure Active Directory o takim samym mailu, które będzie miało role Global Administratora. Wówczas AD Connect założy konto w domenie @onmicrosoft.com a do nazwy użytkownika doda kilka cyferek i będziemy mieli konta:

  • mariusz.ferdyn8858@mojadomena.onmicrosoft.com
  • mariusz.ferdyn@mojadomena.pl

Do połączenia (matchowania) kont Azure Active Directory I Active Directory służy atrybut ImmutableID. I mówiąc, krótko musimy ustawić ten atrybut dla już istniejącego konta w Azure Active Directory, poniższą procedurą:

  1. Przenieść użytkwonika w Active Directory do konteneru, który nie jest synchronizwany
  2. Dokonać synchronizacji (Start-ADSyncSyncCycle -PolicyType Delta)
  3. Wyświetlić ImmutableID poleceniem:
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn8858@mojadomena.onmicrosoft.com|fl
  4. Usunąć użytkownika z Azure Active Directory
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn8858@mojadomena.onmicrosoft.com|Remove-MsolUser -RemoveFromRecycleBin
  5. Dokonać synchronizacji (Start-ADSyncSyncCycle -PolicyType Delta)
  6. Wyświetlić parametry istniejącego użytkownika w Azure Active Directory
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn@mojadomena.pl|fl
  7. Ustawić immutableid otzrymane z polecenia 3, poprzez:
    get-MsolUser -UserPrincipalName mariusz.ferdyn@mojadomenapl.pl|Set-MsolUser -ImmutableId “W7gqU22hws4tpsPw==”
  8. Dokonać synchronizacji (Start-ADSyncSyncCycle -PolicyType Delta)

Po powyższym konta powinny być zsynchronizowane prawidłowo, a sama metoda może być stosowana do migracji użytkowników między domenami.


If we use AD Connect software to synchronize Active Directory local accounts, and previously we had some accounts in Azure Active Directory, sooner or later we will meet with the conflict of setting up an account in Azure Active Directory based on the Active Directory account. This will happen if we have the same UPN in Active Directory and set up an account in Azure Active Directory with the same e-mail that have the role of Global Administrator. Then AD Connect will create an account in the @ onmicrosoft.com domain and add a few numbers to the username, so we will have accounts:

  • mariusz.ferdyn8858@mojadomena.onmicrosoft.com
  • mariusz.ferdyn@mojadomena.pl

The ImmutableID attribute is used to connect (match) Azure Active Directory and Active Directory accounts. To merge two accounts, we have to set this attribute for an existing account in Azure Active Directory, with the following procedure:

  1. Move the user in Active Directory to a container that is not synchronizing
  2. Synchronize (Start-ADSyncSyncCycle -PolicyType Delta)
  3. Display ImmutableID with the command:
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn8858@mydomain.onmicrosoft.com|fl
  4. Remove the user from Azure Active Directory
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn8858@mydomain.onmicrosoft.com|Remove-MsolUser -RemoveFromRecycleBin
  5. Synchronize (Start-ADSyncSyncCycle -PolicyType Delta)
  6. View the parameters of an existing user in Azure Active Directory
    get-MsolUser -ReturnDeletedUsers -UserPrincipalName mariusz.ferdyn@mydomain.com|fl
  7. Set the immutableid from the command 3, by:
    get-MsolUser -UserPrincipalName mariusz.ferdyn@mojadomenapl.pl|Set-MsolUser -ImmutableId “W7gqU22hws4tpsPw ==”
  8. Synchronize (Start-ADSyncSyncCycle -PolicyType Delta)

After the above, the accounts should be synchronized correctly, and the method can be used to migrate users between domains.

Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet – AzureRM, MSOnline

Jeżeli chcemy zainstalować moduł PowerShell do zarządzania np. Azure (AzureRM) na Windows 7, Windows 8, Windows 2008 R2, Windows 2012, Windows 2012R2 i w tym celu wydamy komendę:

Install-Module AzureRM

Zobaczymy błąd:

Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet, funce program. Check the spelling of the name, or if a path was included, verify that the path
At line:1 char:1
+ Install-Module AzureRM
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundE + FullyQualifiedErrorId : CommandNotFoundException

 

Aby rozwiązać ten problem do niedawna trzeba było korzystać z Web Platform Installer. Jedną z trochę zapomnianych jest zainstalowanie PackageManagement PowerShell Modules. Po instalacji pakietu mamy dostęp do komendy ‘Install-Module’ i możemy zainstalować nie tylko AzureRM, jak również np. moduł MSOnline:

Install-Module MSOnline

 


 

If you want to install the PowerShell module for managing eg. Azure (AzureRM) on Windows 7, Windows 8, Windows 2008 R2, Windows 2012, Windows 2012R2 and for this purpose we will issue the command:

Install-Module AzureRM

We will see:

Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet, funce program. Check the spelling of the name, or if a path was included, verify that the path
At line:1 char:1
+ Install-Module AzureRM
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundE + FullyQualifiedErrorId : CommandNotFoundException

 

To solve this problem we usually had to use the Web Platform Installer. But there is another option – just install PackageManagement PowerShell Modules. After installing the package we have access to the ‘Install-Module’ command and we can install not only AzureRM, but also for example the MSOnline module:

Install-Module MSOnline

 

Migracja z Modelu Klasycznego do Azure Resource Manager / Migration from the Classic Model to Azure Resource Manager

Mimo, iż Azure Resource Manager ma już ładnych kilka lat – zdarza się, iż zastajemy Subskrybcje, gdzie usługi wdrożone są w modelu Classic.

Poniższe kroki migrują Storage Account z Modelu klasycznego do ARM.

Login-AzureRmAccount

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate #Wait for registered

Add-AzureAccount

Get-AzureSubscription

Select-AzureSubscription -SubscriptionId “subscription id”

Get-AzureStorageAccount

$storageAccountName=”imagesmf”

$validate=Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName -Verbose

$validate

$validate.ValidationMessages

Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName

Move-AzureStorageAccount -Commit -StorageAccountName $storageAccountName #-Abort will cancel operation

 

Po migracji zasoby będą w Resource Group z suffixem -Migrated. A operacja ta jest niezbędna jeżeli chcemy migrować zasoby z jednej subskrypcji do innej.


Migration from the Classic Model to Azure Resource Manager

Everyone use Azure Resource Manager for several years, but it happens that some resources are still implemented in the Classic model. The following steps migrate the Storage Account from the Classic Model to ARM.

Login-AzureRmAccount

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate #Wait for registered

Add-AzureAccount

Get-AzureSubscription

Select-AzureSubscription -SubscriptionId “subscription id”

Get-AzureStorageAccount

$storageAccountName=”imagesmf”

$validate=Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName -Verbose

$validate

$validate.ValidationMessages

Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName

Move-AzureStorageAccount -Commit -StorageAccountName $storageAccountName #-Abort will cancel operation

After migration, the resources will be in the Resource Group with suffix -Migrated. And this operation is necessary if we want to migrate resources from one Subscription to another.


More info / Więcej informacji

Exchange – naprawa bazy danych – aktualny przewodnik / Exchange Recover Database Complete Fast Guide

Czasami się zdarzy, że nasza baza danych w Exchange nie daje się zamontować, a próby montowania kończą się to komunikatami typu:

  • Operation failed with message: MapiExceptionJetErrorConsistentTimeMismatch: Unable to mount database
  • MapiExceptionJetErrorreadVerify Failure

Do naprawy bazy służy narzędzie eseutil i o dziwo na Internetach, nie ma przewodnika, co zrobić krok po kroku i dość szybko natrafiamy na konieczność użycia komendy /p, która to naprawia bazę danych, ale wraz ze stratą danych i celowo tutaj tego nie opisujemy, jako ostateczność odzyskania danych.

Poniżej co należy wykonać, aby naprawić bazę danych:

eseutil /ml “e:\Exchange\Databases_Logs\Mailbox_DB2″ – ścieżka do katalogu z logami, sprawdza poprawność logów transakcyjnych

eseutil /mh ” e:\Exchange\Databases_Data\Mailbox_DB2″ – ścieżka do plików z bazą danych, wyświetla informacje o bazie danych – zazwyczaj będzie tutaj informacja Dirty SchutDown i trzeba dobrowadzić do stanu Clean ShutDown

 

Naprawa bazy danych:

eseutil /R E00 /l “e:\Exchange\Databases_Logs\Mailbox_DB2″ /d ” e:\Exchange\Databases_Data\Mailbox_DB2″ /S ” e:\Exchange\Databases_Data\Mailbox_DB2″

przełączniki:
/l – ścieżka do katalogu z logami
/d – ścieżka do katalogu z bazą danych – bez podania pliku edb i bez \ na końcu!
/S – miejsce na nowy check point – w miejscu tym nie powinnu być pliku .chk (możemy go skasować bądź przenieść w miejscy, gdyby był z jakiegoś powodu potrzebny).

Po wykonaniu tej operacji logi transakcyjne będą aplikowane do pliku bazy danych. Gdyby skończyło się to komunikatem:

  • JET_errReadVerifyFailure, Checksum error on a database page

Oznacza, to iż plik danych jest uszkodzony i przed opcją /p uchronić nas może tylko odzyskanie go z backupu. Możemy odzyskać go do innej lokalizacji i w samym Exchange wykonać operacje, która wskaże nam nowy plik edb, ale bez kopiowania starego pliku:

Move-DatabasePath -Identity Mailbox_DB2 -EdbFilePath “F:\New_patch\Mailbox_DB2.edb” -ConfigurationOnly

Po odzyskaniu pliku .edb z backupu aplikujemy logi transakcyjne opisaną już metodą i w ten sposób nie powinniśmy stracić żadnych danych! Po wykonaniu powinniśmy móc zamontować bazę danych:

Get-MailboxDatabase |Mount-Database

 

A tak przy okazji logi transakcyjne są kasowane po prawidłowym wykonaniu backupu.

 


 

Sometimes it happens that our Exchange database cannot be mounted, and mounting attempts end with messages like:

  • Operation failed with message: MapiExceptionJetErrorConsistentTimeMismatch: Unable to mount database
  • MapiExceptionJetErrorreadVerify Failure

The eseutil tool is used to repair the database and I noticed that on the Internet, there is no guide what to do step by step. Moreover we can quickly find option to use the /p command that repairs the database, but with the loss of data. It should be used as a last hope option!

What you need to do to repair the database:

eseutil / ml “e: \ Exchange \ Databases_Logs \ Mailbox_DB2” – path to the directory with logs, checks the correctness of transaction logs

eseutil / mh “e: \ Exchange \ Databases_Data \ Mailbox_DB2” – path to files with database, displays information about the database – it will usually be Dirty SchutDown information and need to be brought to the Clean ShutDown state

Database repair:

eseutil / R E00 / l “e: \ Exchange \ Databases_Logs \ Mailbox_DB2” / d “e: \ Exchange \ Databases_Data \ Mailbox_DB2” / S “e: \ Exchange \ Databases_Data \ Mailbox_DB2”

switches:
/ l – directory path with logs
/ d – path to the database directory – without the edb file and without \ at the end!
/ S – a place for a new check point – in this place there should not be a .chk file (we can delete it or move it to a place if it was needed for some reason).

After this operation, transaction logs will be applied to the database file. If it would end with a message:

JET_errReadVerifyFailure, Checksum error on a database page

It means that the data file is damaged and we need to recover it from the backup (or use /p option). We can recover it to a different location and perform operation in that tell Exchange to use a new edb location without copying the old file:

Move-DatabasePath -Identity Mailbox_DB2 -EdbFilePath “F: \ New_patch \ Mailbox_DB2.edb” -ConfigurationOnly

After recovering the .edb file from the backup, we can apply transactional logs with the method already described and in this way we will not lose any data. After execution, we should be able to mount the database:

Get-MailboxDatabase | Mount-Database

Transaction logs are deleted after proper backup.

Aktualizacja Exchange 2010 (i nie tylko) do Office 365 lub Exchange 2016

 

Gdzieniegdzie jeszcze można spotkać Exchange 2010 i klient decyduje się do przeniesienia zasobów do Exchange 2016 lub Office 365. Niby sprawa prosta, ale uwaga Exchange 2010 musi mieć zainstalowanego Service Pack 3 oraz najnowszy Cumulative Update/ Update Rollup. Jako, że Exchange 2010 to produkt już 8 letni pamiętajmy, iż przy aktualizacji powinniśmy:

  1. Przed rozpoczęciu prac powinniśmy wykonać kopie bezpieczeństwa Active Directory, jak i samego Exchange.
  2. Przy instalacji powinniśmy wyłączyć system do backupu (Backup Exec zatrzymujemy serwisy) oraz system antywirusowy (a w szczególności BACKP EXEC – bo otrzymamy błąd):

    Setup cannot continue with the upgrade because the ‘beremote’ () process (ID: 2416) has open files. Close the process and restart Setup.Po operacji pamiętajmy o ich włączeniu.

  3. Przed instalacją poprawek powinniśmy wyłączyć sprawdzanie odwołanych certyfikatów, a więc:
    Internet Explorer =>Internet Options => Advanced
    Security section => Odchaczamy:
    Check for publisher’s certificate revocation
    Check for server certificate revocation

    Po instalacji oczywiście wracamy do stanu pierwotnego.

  4. Service Pack 3 dla Exchange 2010 dostępny tutaj, ściągamy i uruchamiamy, co powoduje i Service Pack rozpakowuje się do wskazanego katalogu
  5. Uruchamiamy aktualizacje schematu z Command Line uruchomionego jako administrator, czyli wydajemy setup.exe /PrepareAD (oczywiście musimy mieć uprawnienia aktualizacji schematu, czyli być w grupie Schema Admins, a jeżeli nam się to nie uda musimy to zrobić z poziomu kontrolera domeny i to nadrzędnego, jeżeli mamy las domen)
  6. Następnie wykonujemy aktualizacje Exchange poprzez wydanie komendy setup.exe /mode:upgrade (z GUI nie zawsze wyskoczy nam menu aktualizacji). Pamiętajmy, aby wykonać to z Command Line uruchomionego jako administrator.
  7. Następnie ściągamy Update Rollup 24 z tej strony.
  8. Samą instalację uruchamiamy z Command Line uruchomionego jako administrator.
  9. Być może zostaniemy poproszeniu o zatrzymanie serwisów (The following applications are using files that need to be updated…)– a więc je zatrzymujemy.

  10. W moim przypadku po instalacji nie wszystkie serwisy zostały uruchomione poprawnie, a więc albo sprawdzamy, które nie są uruchomione i je uruchamiamy lub po prostu restartujemy serwer.
  11. Uwaga w przypadku posiadania DAGa, ta procedura wygląda trochę inaczej i musimy przełączać serwery w tzw. maitenance mode.

 

PS: Exchange 2010 nie możemy migrować bezpośrednio do Exchange 2019, trzeba to zrobić poprzez migracje do 2016.

 

Filtrowanie po użytkownikach i GPO nie działa / User filtering and GPO does not work

Ostatnio się zdziwiłem, iż GPO filtrowane po użytkownikach nie działa. Robiłem to setki razy, i zawsze było OK. A tym razem – nie działa, albo przestało działać.

Przyczyną jest poprawka MS16-072: Security update for Group Policy: June 14, 2016.

Mówiąc krótko – jeżeli mamy politykę GPO i ją filtrujemy np. na grupę użytkowników, to aby polityka ta działała należy pomimo nadania uprawnień dla danej grupy Apply Group Policy i Read – musimy dla Authenticated User ustawić uprawnienie na Read.


I was surprised that GPO filtered by user group does not work. I did it hundreds of times, and it was always OK. And this time – it does not work or it has stopped working.

The reason is MS16-072: Security update for Group Policy: June 14, 2016.

In short, if we have a GPO policy filtered to a group of users, we must set the permission to Read on the Authenticated User, in spite of granting rights to the group of users – Apply Group Policy and Read.

Obejście (Bypass) the PowerShell Execution Policy

Czasami musimy wykonać skrypt PowerShell mimo ustawienia Execution Policy na Restricted (ustawienie domyślne). W Internecie szybko znajdziemy strony typu „15 Ways to Bypass the PowerShell Execution Policy” lecz nie wszystkie metody działają. Dla mnie jedną z metod zawsze działających jest wykonanie:

type script.ps1 |powershell.exe -windowstyle hidden -noprofile –

lub w pliku bat, abyśmy nie widzieli za dużo na ekranie:

@echo off
::run_ps_script.bat
type script.ps1 |powershell.exe -windowstyle hidden -noprofile –

Więcej informacji o wykonywaniu z pozoru niechcianego oprogramowania znajdziecie w moim kursie na Microsoft Virtual Academy – “Wykorzystanie narzędzi hackerskich do audytu środowiska informatycznego“.


Sometimes we have to run the PowerShell script despite the Execution Policy setting on Restricted (default). On the Internet, you will quickly find pages like “15 Ways to Bypass the PowerShell Execution Policy” but not all methods work. For me, one of the methods that are always working is to make:

type script.ps1 |powershell.exe -windowstyle hidden -noprofile –

or in a bat file so that we do not see too much on the screen:

@echo off
:: run_ps_script.bat
type script.ps1 | powershell.exe -windowstyle hidden -noprofile –

More information about performing seemingly unwanted software can be found in my course at the Microsoft Virtual Academy – “Using hack tools for the audit of the IT environment“.

autologon.microsoftazuread-sso.com – Pass-through Authentication

Uwierzytelnianie typu Pass-through Authentication stanowi dość ciekawą alternatywę dla implementacji Active Directory Federation Services. Generalnie polega, na tym iż na kontrolerach domeny powinien być zainstalowany Agent, który pobiera kolejkę uwierzytelniania z chmury, uwierzytelnia użytkownika i tą informacje zwraca do chmury. Do dzisiaj nie spotkałem się z wadami tego rozwiązania, a jest znacznie prostsze i szybsze we wdrożeniu do niedawna mojej ulubionej usługi ADFS.

 

Pewną niedogodnością może być konieczność dodania witryny autologon.microsoftazuread-sso.com do strefy Local Intranet.

Na stronach Microsoft opisywane są różne metody, ale dla mnie najpewniejszą jest użycie skrypt PowerShell (jeżeli będziemy to robić masowo za pomocą GPO, to być może na stacjach będziemy musieli ustawić PowerShell Execution Policy lub skorzystać z metody z następnego posta):


Pass-through Authentication is an interesting alternative to the implementation of Active Directory Federation Services. Generally, it is based that Agents installed on premise servers downloads the authentication requests from the cloud, authenticates the user and returns this information to the cloud. Until today, I have not met with the disadvantages of this solution, and it is much simpler and faster in implementing my favorite ADFS service.

An inconvenience may be the need to add the autologon.microsoftazuread-sso.com site to the Local Intranet zone.

There are various methods described on Microsoft’s pages, but for me the most reliable one is to use the PowerShell script (if we do it massively using GPO, maybe we will have to set the PowerShell Execution Policy – see next post):

 

#Functions from https://github.com/LanLorde/Scritps2/blob/57d714240dc0338da8c7123f33693e092905f53e/PowerShell/LessUsed/OneDriveMapper_v2.53.ps1
function addSiteToIEZoneThroughRegistry{
Param(
[String]$siteUrl,
[Int]$mode=2 #1=intranet, 2=trusted sites
)
try{
$components = $siteUrl.Split(“.”)
$count = $components.Count
if($count -gt 3){
$old = $components
$components = @()
$subDomainString = “”
for($i=0;$i -le $count-3;$i++){
if($i -lt $count-3){$subDomainString += “$($old[$i]).”}else{$subDomainString += “$($old[$i])”}
}
$components += $subDomainString
$components += $old[$count-2]
$components += $old[$count-1]
}
if($count -gt 2){
$res = New-Item “hkcu:\software\microsoft\windows\currentversion\internet settings\zonemap\domains\$($components[1]).$($components[2])” -ErrorAction SilentlyContinue
$res = New-Item “hkcu:\software\microsoft\windows\currentversion\internet settings\zonemap\domains\$($components[1]).$($components[2])\$($components[0])” -ErrorAction SilentlyContinue
$res = New-ItemProperty “hkcu:\software\microsoft\windows\currentversion\internet settings\zonemap\domains\$($components[1]).$($components[2])\$($components[0])” -Name “https” -value $mode -ErrorAction Stop
}else{
$res = New-Item “hkcu:\software\microsoft\windows\currentversion\internet settings\zonemap\domains\$($components[0]).$($components[1])” -ErrorAction SilentlyContinue
$res = New-ItemProperty “hkcu:\software\microsoft\windows\currentversion\internet settings\zonemap\domains\$($components[0]).$($components[1])” -Name “https” -value $mode -ErrorAction Stop
}
}catch{
return -1
}
return $True
}
function checkRegistryKeyValue{
Param(
[String]$basePath,
[String]$entryName
)
try{$value = (Get-ItemProperty -Path “$($basePath)\” -Name $entryName -ErrorAction Stop).$entryName
return $value
}catch{
return -1
}
}
#Main
if((checkRegistryKeyValue -basePath “HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon” -entryName “https”) -eq 1){
Write-Host “SSO – already exist”
Exit}
if((checkRegistryKeyValue -basePath “HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon” -entryName “https”) -eq 2){
Write-Host “SSO – already in wrong place”
Write-EventLog -LogName “Application” -Source “Office365” -EventID 666 -EntryType Information -Message “autologon.microsoftazuread-sso.com – exist in Trusted Zones” -Category 1 -RawData 10,20
Exit}
if ((addSiteToIEZoneThroughRegistry -siteUrl “autologon.microsoftazuread-sso.com” -mode 1) -eq $True) {Write-Host “SSO – just enabled”}

Windows Server 2019 Admin Center – rejestracja w Azure celem wykonywania Backupu, Aktualizacji itp. / Windows Server 2019 Admin Center – register in Azure to setup Backup, Updates problems

W przypadku wystąpienia błędu:

Failed to get Azure subscriptions. Detailed error: Failed to acquire token
AADSTS65001: The user or administrator has not consented to use the application with ID ‘1ab6fc84-f0f1-458a-b4de-9289a7ea79df’ named ‘WindowsAdminCenter-https://10.0.0.5’.

Send an interactive authorization request for this user and resource.

Należy – zalogować się do portalu Microsoft Azure, przejść do Azure Active Directory, następnie App Registrations wybrać View all applications, a następnie wybrać aplikację WindowsAdminCenter, przejść na Settings oraz Required Permissions oraz wcisnąć Grant perrmissions.


In case of error:

Failed to get Azure subscriptions. Detailed error: Failed to acquire token
AADSTS65001: The user or administrator has not consented to use the application with ID ‘1ab6fc84-f0f1-458a-b4de-9289a7ea79df’ named ‘WindowsAdminCenter-https://10.0.0.5’.

Send an interactive authorization request for this user and resource.

Please login to portal.azure.com, go to Azure Active Directory, App Registrations, press View all applications. Please locate WindowsAdminCenter application, choose it and press Settings and Required Permissions and press Grant perrmissions

 

Hyper-V – Synthetic FibreChannel Port: Failed to start reserving resources with Error ‘Cannot create a file when that file already exists.

In case of this type of error:

‘VM’ failed to start. (Virtual machine ID C2FBAB4B-29DC-4D70-A32A-B4C4CE3F0065)

‘VM’ Synthetic FibreChannel Port: Failed to start reserving resources with Error ‘Cannot create a file when that file already exists.’ (0x800700B7). (Virtual machine ID C2FBAB4B-29DC-4D70-A32A-B4C4CE3F0065)

‘VM’: NPIV virtual port operation on virtual port (C003FF5F4A830002) failed with an error: The world wide port name already exists on the fabric. (Virtual machine ID C2FBAB4B-29DC-4D70-A32A-B4C4CE3F0065)

‘B1854B54-A335-424B-92C2-3E6DE30F0613’: NPIV virtual port operation for virtual port (C003FF5F4A830003) on physical port (10000090FA922225) failed with an error: (0x800700B7) and NPIV error: (0x00000000). (Virtual machine ID C2FBAB4B-29DC-4D70-A32A-B4C4CE3F0065)

One of the solution is restart Hyper Visor.

Rollup 27 for Azure Site Recovery – to new, but Rollup 26 to old / Aktualizacja Configuration/Process Serwera

I have tried to install Rollup 27 for Azure Site Recovery for Configuration/Process server, but I receive:

The version of Azure Site Recovery Unified Setup installed on this computer is very Old. You first need to update to an intermediate version of the software before you can apply this update.

Then I tried to install Rollup 26 for Azure Site Recovery for Configuration/Process server, but I receive:

Microsoft Azure Site Recovery Unified Setup – Upgrade is not supported as a higher version of the software is already installed.

Solution:

  1. Download Rollup 27 for Azure Site Recovery
  2. Create directory c:\ManualInstall
  3. Extract it using MicrosoftAzureSiteRecoveryUnifiedSetup.exe /q /x:c:\ManualInstall
  4. Inastall manually: CX_THIRDPARTY_SETUP.EXE /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
  5. Install manually: UCX_SERVER_SETUP.EXE /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /UPGRADE
  6. Restart and wait for communication to the Azure Site Recovery
  7. Run original setup of Rollup 27 for Azure Site Recovery – should finish normally.
  8. Update Agents from the portal (normal procedure)

Please remember that update is supported only betwen 4 version, so you need to do intermediate updates.


Aktualizacja Configuration/Process Serwera w usłudze Azure Site Recovery.

Próbowałem zaktualizować Configuration/Process Serwera w usłudze Azure Site Recovery do wersji Rollup 27 i uzyskałem komunikat:

The version of Azure Site Recovery Unified Setup installed on this computer is very Old. You first need to update to an intermediate version of the software before you can apply this update.

Kiedy natomiast chciałem zainstalować wersje Rollup 26 otrzymałem komunikat:

Microsoft Azure Site Recovery Unified Setup – Upgrade is not supported as a higher version of the software is already installed.

Rozwiązanie problemu:

  1. Ściągnąć Rollup 27 for Azure Site Recovery
  2. Utworzyć katalog c:\ManualInstall
  3. Wypakować Rollup 27 używając komendy MicrosoftAzureSiteRecoveryUnifiedSetup.exe /q /x:c:\ManualInstall
  4. Zainstalować komponen ręcznie: CX_THIRDPARTY_SETUP.EXE /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
  5. Zaktualizować component ręcznie: UCX_SERVER_SETUP.EXE /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /UPGRADE
  6. Zrestartować serwer I poczekać na komunikacje z Azure Voult’em
  7. Uruchomić Rollup 27 for Azure Site Recovery jakgdyby nigdy nic, instalacja powinna zakończyć się sukcesem.
  8. Zaktualizować Mobility Agentów z portal Azure – wg. normalnej procedury.

Proszę pamiętać, iż aktualizacje możemy robić tylko 4 wersje do góry, jeżeli przespaliśmy i potrzebujemy aktualizować więcej wersji wówczas należy wykonać aktualizacje pośrednie.


Update Rollup 26 for Azure Site Recovery.
Update Rollup 27 for Azure Site Recovery.

Exchange Hybrid Configuration Step by Step Video

Exchange Hybrid Configuration Wizard 2013, 2016, 2019 step by step guide with migrate and test some mailboxes Include domain verification for Federation Trust and test move some mailbox to the Office 365.


Exchange Hybrid Configuration Wizard 2013, 2016, 2019 krok po kroku wraz migracją wraz zastawieniem Federation Trust i przeniesieniem skrzynek pocztowych.

Zabezpieczamy Serwer Hyper-V poprzez Hyper-V Replica oraz poprzez Azure Site Recovery

Zabezpieczmy Serwer Hyper-V poprzez replikowanie maszyn wirtualnych znajdujących się na nim do Microsoft Azure, dzięki usłudze Azure Site Recovery. Co ciekawe zabezpieczamy Microsoft Hyper-V serwer, który jest dostępny całkowicie bezpłatnie, jedyna różnica to taka, że serwer taki nie posiada interface graficznego, a całą konfiguracje musimy wykonywać zdalnie lub za pomocą Power Shell/cmd.

Od 13:35 minuty wykonujemy Hyper-V Replika do Azure – jako maszyny wirtualnej. I tutaj w przeciwieństwie do Azure Site Recovery nie musimy płacić 29 Euro na miesiąc za każdą zreplikowaną maszynę wirtualną, ale za nieograniczona ich liczbę zapłacimy tylko 11 euro…
Co ciekawe włączamy replikacje Hyper-V dla komputerów, które nie są w domenie.

Nagranie jest obrobionym nagraniem ze 102 spotkania Warszawskiej Grupy Użytkowników i Specjalistów Windows WGUiSW.

Password Less – Microsoft Authenticator – Fido2 – Step by Step

Uwierzytelnianie bez haseł (Password Less) ogłoszone podczas Ignite 2018. Obecnie każdy może włączyć dla kont Microsoft Account (dawniej Live ID) oraz dla kont Office 365 (Azure AD).

Szybkie Linki:

  • Jak Działa Password Less
  • Jak skonfigurować:

Jak Skonfigurować dla kont Microsoft – Najszybciej po zalogowaniu się do konta na stronie https://account.live.com/ przechodzimy na zakładkę prywatność i powinien zadziałać kreator (radzimy wcześniej zmienić język na angielski).

Gdybyśmy mieli kłopoty z konfiguracją przez zakładkę prywatność, proszę przejść do zakładki Security i skonfigurować uwierzytelnianie dwustopniowe, a następnie uwierzytelnianie za pomocą aplikacji, jak poniżej (tutaj video):

Czasami po tej operacji należy usunąć konto z aplikacji Microsoft Authenticator i podłączyć konto ponownie.

Włączenie Password Less dla usługi Azure Active Directory (Office 365): https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-authentication-phone-sign-in


Password-less authentication was announced during Ignite 2018. Now anyone can enable for Microsoft Account accounts (formerly Live ID) and for Office 365 Accounts (Azure AD) – Private Preview.

Quick Links:

  • Password Less – Now is it working
  • Configuration – Step By Step:

How to configure for Microsoft Accounts – The fastest way to log in to your account at https://account.live.com/ and go to the PRIVACY tab and the wizard should appear (we advise you to change the language to English first).

If you have trouble configuring via the PRIVACY tab, please go to the SECURITY tab and configure two-step authentication and after that authentication using the application as below (video here):

Sometimes, after this operation, you must delete the account from the Microsoft Authenticator application and connect the account again.

Password Less for Azure Active Directory (Office 365): https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-authentication-phone-sign-in

Ultra SSD – 160000 IOPS i 2000 MB/s – Killer jeżeli chodzi o szybkość

Po migracji infrastruktury do chmury Microsoft Azure – najczęściej spotykanym zarzutem – jest, ale te dyski są wolne! Ale czy rzeczywiście? Przy wymagających zasobach musimy przechodzić na dyski SSD lub tworzyć Softwarowy RAID – albo jedno i drugie. Na Ignite 2018 zaprezentowane zostały nowe możliwości jeżeli chodzi o wielkość dysków, jak i ich szybkość:

Ale najważniejsza rzecz to wprowadzenie dysków Ultra SSD, które wręcz zabijają szybkością:

Następna funkcjonalność, to możliwość zmiany parametrów dysków w locie bez restartu maszyny wirtualnej. Czyli możemy podwyższyć szybkość na czas generowania raportów – 2000 MB/s i opóźnienie poniżej 1ms.

Jeżeli chodzi o elastyczność, to powyżej 1 TB, możemy je powiększać co 1 TB i płacić tylko za tyle do ilu powiększyliśmy dysk. Aby wykorzystać moc tych dysków wprowadzone są experymantalne wielkości maszyn wirtualnych.

Pozostałe – także oczekiwane funkcjonalności ogłoszone podczas Ignite 2018, to nazwałbym je kontrowersyjnie snapshotami dla maszyn wirtualnych:

Dodano możliwość migracji dysków Managed pomiędzy Subskrybcjami i Resoure Grupami.

Jeszcze dzisiaj na Expo dowiem się, kiedy będzie możliwość backupowania dysków powyżej 4TB – Stay Tuned.


After migrating infrastructure to the Microsoft Azure Cloud – the most common complaint – is, but these disks are slow! For demanding resources, we have to switch to SSD drives or create Software RAID – or both. At Ignite 2018, new possibilities were presented in terms of the size of disks as well as their speed:

But the most important thing is the introduction of Ultra SSD disks, speed – killer:

Next functionality, is to change disk parameters on the fly, without restarting the virtual machine.

We can incrase Ultra SSD Disk by 1TB from 1TB.

Semi Snapshot for Azure:

Posibility of migrating Disk beetwen Subscriptions and Resource Groups:

Jeszcze dzisiaj na Expo dowiem się, kiedy będzie możliwość backupowania dysków powyżej 4TB – Stay Tuned.

Zmiany w certyfikacji, egzaminach i szkoleniach w zakresie Microsoft Azure i Office 365 / Changes in certification, exams and trainings for Microsoft Azure and Office 365

Podczas konferencji Microsoft Ignite 2018 zostały ogłoszone zmiany dotyczące szkoleń w zakresie technologii chmurowych Azure i Office 365. Zmiany te są bardzo przemyślane i wg. mnie sensowne, ale do rzeczy:

Certyfikaty i szkolenia będą oparte na rolach, jakie pełnimy w organizacjach – i tak na początku będziemy mieli sześć ról, jak poniżej:

Jakie egzaminy trzeba zdać, aby uzyskać przykładowe certyfikaty:

Tylko przez określony czas będzie można zaktualizować posiadane tytuły, do nowych tytułów opartych na rolach – jak to wygląda poniżej:

Największa zmiana jaka nas czeka – to egzaminy oparte na symulacjach “Performance Based Testing”! Tak musimy coś wyklikać, wdrożyć, napisać! I nie będzie to Flashowy symulator, a prawdziwa maszyna wirtualna z dostępem do przeglądarki i portalu Azure, dostarczoną subskrypcją, w której musimy coś wdrożyć. Nie ważna jaką drogą wdrożymy rozwiązanie Portal, Powershell – ma działać, tak aby skrypty oceniające to zobaczyły i sprawdziły. Internet z maszyny ma nie być dostępny – tylko portal Azure, Office 365 – a jak to mniej więcej będzie wyglądało widzimy tutaj:

Kursy Office 365 i Azure będą kursami jedno i pół dniowymi, z których będziemy mogli skomponować to czego chcemy się nauczyć. Czyli jeżeli np. nie będzie nas interesować Azure IoT możemy „nie brać” tego modułu, albo w to miejsce wybrać coś innego np. Azure Networking.
Do tej pory niektóre ośrodki próbowały to organizować dobierając odpowiednie moduły, ale wychodziły z tego szkolenia autorskie i niekiedy był problem z dostępem do podręczników. Teraz wszystko dostajemy w paczkach od Microsoft – to co chcemy. Oczywiście nie zmienia się forma, szkolenia realizują trenerzy i ośrodki szkoleniowe. Będą też szkolenia Online.

Jeżeli chcemy dowiedzieć się więcej o nowej certyfikacji, przygotować do prowadzenia nowych szkoleń, czy też od razu nabyć wiedze zapraszam do obejrzenia poniższych sesji na Ignite 2018, zapewne dostępnych w postaci nagrań.

 


During the Microsoft Ignite 2018 conference, Microsoft announced changes regarding trainings in Azure and Office 365 cloud technologies.

Certificates and training will be based on the roles we play in organization – at the beginning there will be six roles, as below:

 

Which exams you have to pass to be certified:

Tylko przez określony czas będzie można zaktualizować posiadane tytuły, do nowych tytułów opartych na rolach – jak to wygląda poniżej:

The biggest change – “Performance Based Testing” simulations! Yes, we must deploy something, implement it, write it in real! And it will not be a Flash simulator, but a real virtual machine with access to the browser and Azure portal, a subscription will be provided, in which we have to implement something. It is not important how we implement! We can use Portal, Powershell, but it should work so that the assessment scripts will see it and check it. The Internet from the machine is not allowed – only the Azure portal, Office 365 – and what more or less will it will look like this:

The Office 365 and Azure courses will be one or a half day courses, from which we will be able to compose what we want to learn. So if, for example, we will not be interested in Azure IoT, we can “not take” this module, or choose something else, eg Azure Networking.

If you want to learn more about the new certification, prepare to deliver new trainings, or acquire knowledge, I invite you to watch the following sessions from Ignite 2018.

WebHook – Tester

Kiedyś różnego rodzeje hostingi wprowadziły rozwiązania typu Cron z których pozwalano wywoływać żądania typu GET, teraz Microsoft Azure kontynuuje tą tradycje, zwłaszcza przy rozwiązaniach typu Azure Event Grid, Azure Functions, Automations. Czasami jednak chcemy przetestować, co jest wysyłane i jak. Oprócz oprogramowania do generowania Requestów typu POSTMAN (nie tylko GET, ale i POST), bardzo ciekawą witryną jest:

https://webhook.site/

gdzie możemy obserwować wywołania docierające na adres, który jest generowany po wejściu na witrynę. Ba – możemy żądania przekierowywać – a jak komus mało funkcjonalności – to mamy źródła!


A long time ago hosting providers implement Cron solution with GET requests. Microsoft Azure continues this, especially with Azure Event Grid, Azure Functions, Automations solutions. Sometimes, we want to test what is sent and how. In addition to the POSTMAN Request generation software (not only GET but also POST), a very interesting site is to receive GET and POST:

https://webhook.site/

where we can observe calls that reach the address that is generated after entering the site. Moreover – we can redirect requests! Do you need more – we have source code!

Azure Site Recovery – Application Consistent Snapshot on Demand / Application Consistent Snapshot na żądanie

Jeżeli robimy tzw. Test Failover lub Failover przy korzystaniu z usługi Azure Site Recovery – to wybieramy punkt odniesienia w czasie (Snapshot), na który ma być uruchomiona maszyna. Częstotliwość ich generowania ustawiamy w Planie działania usługi Azure Site Recovery.

Czasami jednak chcemy wykonać Snapshot na żądanie – aby to zrobić wystarczy na maszynie gdzie zainstalowany jest Mobility Agent następującą komendę:

“C:\Program Files (x86)\Microsoft Azure Site Recovery\agent\vacp.exe” -systemlevel

Application Consistent Snapshot używa Volume Shadow Copy Service (VSS), aby być pewnym, iż wszystkie aplikacje będą działały prawidłowo i były w spójnym stanie – tak jak w zwykłym backupie.


in Azure Site Recovery during Test Failover or Failover – we can select the reference point in time (Snapshot), on which the VM should start. The frequency of generation of Application Consistent Snapshot is set in the Azure Site Recovery Service.

If we want to perform Snapshot on demand please run on the machine where the Mobility Agent is installed the following command:

“C:\Program Files (x86)\Microsoft Azure Site Recovery\agent\vacp.exe” -systemlevel

Application-consistent snapshots use Volume Shadow Copy Service (VSS) to ensure that applications are in a consistent state when the snapshot is taken.

Azure Pass Activation – Usage limit exceeded. Try again tomorrow / Przekroczono limit użycia. Spróbuj ponownie jutro.

This is continuation of Azure Pass Activation – especially multiple Times – at conferences, workshops topic.

Sometime, for testing purposes you need to create a new independent Microsoft Account, especially for use Microsoft Azure Pass Subscription. For a long time you can just create a new Microsoft ID (Live ID) account and assign Microsoft Azure Pass Subscription, but now during verification of your Mobile Number you probably receive:

Usage limit exceeded. Try again tomorrow.

This usually means that you use your Mobile Number for verification Microsoft Account more than 2,3,4 times… What to do?

  1. Go to https://aad.portal.azure.com/
  2. After that go to https://portal.azure.com/ – You are probably have disabled or Your Subscription (if not you can just create a Trial Here, using Azure Pass also – see here).
  3. Create a New Azure Active Directory
  4. Log Out, Close Browser and log In Again
  5. Switch Directory to a New One
  6. Create a New User in Azure Active Directory
  7. Log Out, Close Browser
  8. In incognito windows/InPrivate Browsing go to https://www.microsoftazurepass.com/ and activate your subscription.

For every Azure Active Directory you can do it only once.

Alternative way, but please use phone call here:


Jest to kontynuacja artykułu Aktywacja Azure Pass szczególnie wielokrotna – na konferencjach, tematach warsztatów.

Czasami, do celów testowych musisz utworzyć nowe, niezależne konto Microsoft, szczególnie w celu wykorzystania darmowej/demonstracyjnej subskrypcji Azure (Microsoft Azure Pass). Najszybciej można było po-prostu utworzyć nowe konto Microsoft ID (Live ID) i przypisać subskrypcję Microsoft Azure Pass, ale teraz podczas weryfikacji numeru telefonu prawdopodobnie otrzymasz:

Przekroczono limit użycia. Spróbuj ponownie jutro.

Zwykle oznacza to, że używasz danego numeru telefonu komórkowego do weryfikacji konta Microsoft 2,3,4 razy … Co robić?

  1. Przejdź do strony https://aad.portal.azure.com/
  2. Następnie przejdź na stronę https://portal.azure.com/ – prawdopodobnie masz wyłączoną subskrypcję lub widoczną swoją subskrypcję (jeśli nie – wówczas możesz po-prostu utworzyć takową jak tutaj).
  3. Utwórz nowy Azure Active Directory
  4. Wyloguj się, zamknij przeglądarkę i zaloguj się ponownie
  5. Przełącz na nowy katalog Azure Active Directory
  6. Utwórz nowego użytkownika w usłudze Azure Active Directory
  7. Wyloguj się, Zamknij przeglądarkę
  8. W oknnie incognito / InPrivate Browsing przejdź na stronę https://www.microsoftazurepass.com/ i aktywuj subskrypcję.

Dla każdego osobnego Azure Active Directory aktywacja Azure Pass przechodzi tylko jednokrotnie, dla kolejnej aktywacji Azure Active Directory wykonaj powyższe czynności ponownie.

Alternatywna droga tutaj (ale proszę używać aktywacji telefonicznej, bo SMS nie zawsze działa).

«< 5 6 7 8 9 >
Projekt i wykonanie: Mobiconnect i fast-sms.net   |    Regulamin
Ta strona korzysta z ciasteczek aby świadczyć usługi na najwyższym poziomie. Dalsze korzystanie ze strony oznacza, że zgadzasz się na ich użycie.Zgoda

Added to Cart

Keep Shopping