Windows admin center не работает powershell

Содержание
  1. Клёвый код
  2. Решаем задачи Абрамян на C. Matrix78
  3. Решаем задачи Абрамян на C. Matrix77
  4. Решаем задачи Абрамян на C. Matrix76
  5. Решаем задачи Абрамян на C. Matrix75
  6. Решаем задачи Абрамян на C. Matrix74
  7. Решаем задачи Абрамян на C. Matrix73
  8. Решаем задачи Абрамян на C. Matrix72
  9. Решаем задачи Абрамян на C. Matrix71
  10. Решаем задачи Абрамян на C. Matrix70
  11. Решаем задачи Абрамян на C. Matrix69
  12. Troubleshooting Windows Admin Center
  13. Installer fails with message: The Module ‘Microsoft.PowerShell.LocalAccounts’ could not be loaded.
  14. I get a This site/page can’t be reached error in my web browser
  15. If you’ve installed Windows Admin Center as an App on Windows 10
  16. If you’ve installed Windows Admin Center as a Gateway on Windows Server
  17. If you have installed Windows Admin Center in an Azure Windows Server VM
  18. Check the Windows version
  19. Make sure the Windows Remote Management (WinRM) service is running on both the gateway machine and managed node
  20. If you’re getting WinRM error messages while managing servers in Windows Admin Center
  21. Did you upgrade your server from 2016 to 2019?
  22. I get the message: «Cant connect securely to this page. This might be because the site uses outdated or unsafe TLS security settings.
  23. I’m having trouble with the Remote Desktop, Events, and PowerShell tools.
  24. I can connect to some servers, but not others
  25. Using Windows Admin Center in a workgroup
  26. What account are you using?
  27. Are you connecting to a workgroup machine on a different subnet?
  28. Configure TrustedHosts
  29. I previously had Windows Admin Center installed, and now nothing else can use the same TCP/IP port
  30. Azure features don’t work properly in Edge
  31. Having an issue with an Azure-related feature?
  32. Providing feedback on issues
  33. Управляем Windows Server из Windows Admin Center
  34. Нюансы
  35. Упрощаем работу
  36. Повышаем безопасность
  37. Выводы

Клёвый код

Скриптописание и кодинг

Решаем задачи Абрамян на C. Matrix78

Matrix78. Дана матрица размера $$M \times N$$. Упорядочить ее строки так, чтобы их минимальные элементы образовывали убывающую последовательность.

Решаем задачи Абрамян на C. Matrix77

Matrix77. Дана матрица размера $$M \times N$$. Упорядочить ее столбцы так, чтобы их последние элементы образовывали убывающую последовательность.

Решаем задачи Абрамян на C. Matrix76

Matrix76. Дана матрица размера $$M \times N$$. Упорядочить ее строки так, чтобы их первые элементы образовывали возрастающую последовательность.

Решаем задачи Абрамян на C. Matrix75

Matrix75. Дана матрица размера $$M \times N$$. Элемент матрицы называется ее локальным максимумом, если он больше всех окружающих его элементов. Поменять знак всех локальных максимумов данной матрицы на противоположный. При решении допускается использовать вспомогательную матрицу.

Решаем задачи Абрамян на C. Matrix74

Matrix74. Дана матрица размера $$M \times N$$. Элемент матрицы называется ее локальным минимумом, если он меньше всех окружающих его элементов. Заменить все локальные минимумы данной матрицы на нули. При решении допускается использовать вспомогательную матрицу.

Решаем задачи Абрамян на C. Matrix73

Matrix73. Дана матрица размера $$M \times N$$. После последнего столбца, содержащего только отрицательные элементы, вставить столбец из нулей. Если требуемых столбцов нет, то вывести матрицу без изменений.

Решаем задачи Абрамян на C. Matrix72

Matrix72. Дана матрица размера $$M \times N$$. Перед первым столбцом, содержащим только положительные элементы, вставить столбец из единиц. Если требуемых столбцов нет, то вывести матрицу без изменений.

Решаем задачи Абрамян на C. Matrix71

Matrix71. Дана матрица размера $$M \times N$$. Продублировать столбец матрицы, содержащий ее минимальный элемент.

Решаем задачи Абрамян на C. Matrix70

Matrix70. Дана матрица размера $$M \times N$$. Продублировать строку матрицы, содержащую ее максимальный элемент.

Решаем задачи Абрамян на C. Matrix69

Matrix69. Дана матрица размера $$M \times N$$ и целое число $$K$$ $$(1 \le K \le $$N$$)$$. После столбца матрицы с номером $$K$$ вставить столбец из единиц.

Источник

Troubleshooting Windows Admin Center

Applies to: Windows Admin Center, Windows Admin Center Preview, Azure Stack HCI, version v20H2

This guide will help you diagnose and resolve issues that are preventing you from using Windows Admin Center. If you are having an issue with a specific tool, please check to see if you are experiencing a known issue.

Installer fails with message: The Module ‘Microsoft.PowerShell.LocalAccounts’ could not be loaded.

This can happen if your default PowerShell module path has been modified or removed. To resolve the issue, make sure that %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules is the first item in your PSModulePath environment variable. You can achieve this with the following line of PowerShell:

I get a This site/page can’t be reached error in my web browser

If you’ve installed Windows Admin Center as an App on Windows 10

  • Check to make sure Windows Admin Center is running. Look for the Windows Admin Center icon in the System tray or Windows Admin Center Desktop / SmeDesktop.exe in Task Manager. If not, launch Windows Admin Center from the Start Menu.

After rebooting, you must launch Windows Admin Center from the Start Menu.

Make sure you are using either Microsoft Edge or Google Chrome as your web browser.

Did you select the correct certificate on first launch?

  • Try opening your browser in a private session — if that works, you’ll need to clear your cache.
Читайте также:  Как самим отремонтировать микроволновку

Did you recently upgrade Windows 10 to a new build or version?

If you’ve installed Windows Admin Center as a Gateway on Windows Server

Make sure you are using either Microsoft Edge or Google Chrome as your web browser.

On the server, open Task Manager > Services and make sure ServerManagementGateway / Windows Admin Center is running.

Test the network connection to the Gateway (replace with the information from your deployment)

If you have installed Windows Admin Center in an Azure Windows Server VM

  • Check the Windows version
  • Did you add an inbound port rule for HTTPS?
  • Learn more about installing Windows Admin Center in an Azure VM

Check the Windows version

Open the run dialog (Windows Key + R) and launch winver .

If you are using Windows 10 version 1703 or below, Windows Admin Center is not supported on your version of Microsoft Edge. Either upgrade to a recent version of Windows 10 or use Chrome.

If you are using an insider preview version of Windows 10 or Server with a build version between 17134 and 17637, Windows had a bug which caused Windows Admin Center to fail. Please use a current supported version of Windows.

Make sure the Windows Remote Management (WinRM) service is running on both the gateway machine and managed node

  • Open the run dialog with WindowsKey + R
  • Type services.msc and press enter
  • In the window that opens, look for Windows Remote Management (WinRM), make sure it is running and set to automatically start

If you’re getting WinRM error messages while managing servers in Windows Admin Center

WinRM doesn’t allow credential delegation by default. To allow delegation, the computer needs to have Credential Security Support Provider (CredSSP) enabled temporarily.

If you’re receiving WinRM error messages, try using the verification steps in the Manual troubleshooting section of Troubleshoot CredSSP to resolve them.

Did you upgrade your server from 2016 to 2019?

  • This may have cleared your trusted hosts settings. Follow these instructions to update your trusted hosts settings.

I get the message: «Cant connect securely to this page. This might be because the site uses outdated or unsafe TLS security settings.

Your machine is restricted to HTTP/2 connections. Windows Admin Center uses integrated Windows authentication, which is not supported in HTTP/2. Add the following two registry values under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Http\Parameters key on the machine running the browser to remove the HTTP/2 restriction:

I’m having trouble with the Remote Desktop, Events, and PowerShell tools.

These three tools require the websocket protocol, which is commonly blocked by proxy servers and firewalls. If you are using Google Chrome, there is a known issue with websockets and NTLM authentication.

I can connect to some servers, but not others

Log on to the gateway machine locally and try to Enter-PSSession in PowerShell, replacing with the name of the Machine you are trying to manage in Windows Admin Center.

If your environment uses a workgroup instead of a domain, see using Windows Admin Center in a workgroup.

Using local administrator accounts: If you are using a local user account that is not the built-in administrator account, you will need to enable the policy on the target machine by running the following command in PowerShell or at a Command Prompt as Administrator on the target machine:

Using Windows Admin Center in a workgroup

What account are you using?

Make sure the credentials you are using are a member of the target server’s local administrators group. In some cases, WinRM also requires membership in the Remote Management Users group. If you are using a local user account that is not the built-in administrator account, you will need to enable the policy on the target machine by running the following command in PowerShell or at a Command Prompt as Administrator on the target machine:

Are you connecting to a workgroup machine on a different subnet?

To connect to a workgroup machine that is not on the same subnet as the gateway, make sure the firewall port for WinRM (TCP 5985) allows inbound traffic on the target machine. You can run the following command in PowerShell or at a Command Prompt as Administrator on the target machine to create this firewall rule:

Windows Server

Windows 10

Configure TrustedHosts

When installing Windows Admin Center, you are given the option to let Windows Admin Center manage the gateway’s TrustedHosts setting. This is required in a workgroup environment, or when using local administrator credentials in a domain. If you choose to forego this setting, you must configure TrustedHosts manually.

To modify TrustedHosts using PowerShell commands:

Open an Administrator PowerShell session.

View your current TrustedHosts setting:

If the current setting of your TrustedHosts is not empty, the commands below will overwrite your setting. We recommend that you save the current setting to a text file with the following command so you can restore it if needed:

Читайте также:  Не работает руль genius twinwheel

Get-Item WSMan:localhost\Client\TrustedHosts | Out-File C:\OldTrustedHosts.txt

Set TrustedHosts to the NetBIOS, IP, or FQDN of the machines you intend to manage:

For an easy way to set all TrustedHosts at once, you can use a wildcard.

When you are done testing, you can issue the following command from an elevated PowerShell session to clear your TrustedHosts setting:

If you had previously exported your settings, open the file, copy the values, and use this command:

I previously had Windows Admin Center installed, and now nothing else can use the same TCP/IP port

Manually run these two commands in an elevated command prompt:

Azure features don’t work properly in Edge

Edge has known issues related to security zones that affect Azure login in Windows Admin Center. If you are having trouble using Azure features when using Edge, try adding https://login.microsoftonline.com, https://login.live.com and the URL of your gateway as trusted sites and to allowed sites for Edge pop-up blocker settings on your client side browser.

  1. Search for Internet Options in the Windows Start Menu
  2. Go to the Security tab
  3. Under the Trusted Sites option, click on the sites button and add the URLs in the dialog box that opens. You’ll need to add your gateway URL as well as https://login.microsoftonline.com and https://login.live.com.
  4. Go to the Pop-up Blocker settings in Microsoft Edge via edge://settings/content/popups?search=pop-up
  5. You’ll need to add your gateway URL as well as https://login.microsoftonline.com and https://login.live.com to the Allow list.

Please send us an email at wacFeedbackAzure@microsoft.com with the following information:

  • General issue information from the questions listed below.
  • Describe your issue and the steps you took to reproduce the issue.
  • Did you previously register your gateway to Azure using the New-AadApp.ps1 downloadable script and then upgrade to version 1807? Or did you register your gateway to Azure using the UI from gateway Settings > Azure?
  • Is your Azure account associated with multiple directories/tenants?
    • If yes: When registering the Azure AD application to Windows Admin Center, was the directory you used your default directory in Azure?
  • Does your Azure account have access to multiple subscriptions?
  • Does the subscription you were using have billing attached?
  • Were you logged in to multiple Azure accounts when you encountered the issue?
  • Does your Azure account require multi-factor authentication?
  • Is the machine you are trying to manage an Azure VM?
  • Is Windows Admin Center installed on an Azure VM?

Providing feedback on issues

Go to Event Viewer > Application and Services > Microsoft-ServerManagementExperience and look for any errors or warnings.

File a bug on our UserVoice that describes your issue.

Please include any errors or warning you find in the event log, as well as the following information:

  • Platform where Windows Admin Center is installed (Windows 10 or Windows Server):
    • If installed on Server, what is the Windows version of the machine running the browser to access Windows Admin Center:
    • Are you using the self-signed certificate created by the installer?
    • If you are using your own certificate, does the subject name match the machine?
    • If you are using your own certificate, does it specify an alternate subject name?
  • Did you install with the default port setting?
    • If not, which port did you specify?
  • Is the machine where Windows Admin Center is installed joined to a domain?
  • Windows version where Windows Admin Center is installed:
  • Is the machine that you are trying to manage joined to a domain?
  • Windows version of the machine that you are trying to manage:
  • What browser are you using?
    • If you are using Google Chrome, what is the version? (Help > About Google Chrome)

—>

Источник

Управляем Windows Server из Windows Admin Center

В данной статье мы продолжаем рассказывать про работу с Windows Server Core 2019. В прошлых постах мы рассказали как готовим клиентские виртуальные машины на примере нашего нового тарифа VDS Ultralight с Server Core за 99 рублей. Затем показали как работать с Windows Server 2019 Core и как установить на него GUI. Сегодня мы поговорим про управление с помощью Windows Admin Center.

Головной болью было, наверное, по соображениям безопасности, разделять роли серверов. Заводить несколько машин, чтобы физически разделить контроллер домена и файловый сервер.
Благо нам на помощь пришла виртуализация, и теперь изолированно друг от друга могут работать несколько служб, которые из соображений безопасности не могут работать на том же сервере. Виртуализация принесла массу удобства, развертывание виртуальных машин из одного шаблона экономит время специалистам, и физически, все в одной коробке с мощным железом.

Машин все меньше, а серверов все больше, даже у меня, для «просто посмотреть» образовалось два контроллера домена, файловый сервер, сервер под Java приложения и еще пачка веб серверов, поэтому давайте поговорим о том, как можно эффективно управлять серверами на Windows, не отрывая левой руки от кофе.

Читайте также:  Кто как настроил total commander

— С помощью Powershell!

Конечно да, но… нет. Продукт позиционируется как удобный инструмент управления гигантской инфраструктурой. Понятно, что это не совсем так, для таких случаев есть Powershell ISE и скрипты, поэтому хотелось бы рассмотреть действительно полезные юзкейсы. Если у вас есть свой опыт, которым вы вы хотели поделиться, мы можем добавить его в эту статью.

Windows Admin Center лучше подходит для управления стоковыми компонентами. На текущий момент только RSAT может управлять установленными ролями.

Используя WAC, можно улучшить безопасность вашей инфраструктуры, если будете использовать его как шлюз.

Сводная таблица того, он умеет и не умеет:

WAC RSAT
Управление компонентами Да Да
Редактор реестра Да Нет
Управление сетью Да Да
Просмотр событий Да Да
Общие папки Да Да
Управление дисками Да Только для серверов с GUI
Планировщик заданий Да Да
Управление устройствами Да Только для серверов с GUI
Управление файлами Да Нет
Управление пользователями Да Да
Управление группами Да Да
Управление сертификатами Да Да
Обновления Да Нет
Удаление программ Да Нет
Системный монитор Да Да
WAC RSAT
Advanced Thread Protection ПРЕВЬЮ Нет
Windows Defender ПРЕВЬЮ Да
Контейнеры ПРЕВЬЮ Да
AD Administrativ Center ПРЕВЬЮ Да
AD Domain and Trusts Нет Да
AD sites and services Нет Да
DHCP ПРЕВЬЮ Да
DNS ПРЕВЬЮ Да
Диспетчер DFS Нет Да
Диспетчер GPO Нет Да
Диспетчер IIS Нет Да

Превью — установка бета версий компонентов для WAC, не входит в состав сборки. Перечислять все не нужно, потому что буквально все компоненты управляются только с помощью RSAT.

Нюансы

Powershell в Windows Admin Center не имеет своей среды сценариев аналогичной Powershell ISE.
Windows Admin Center не поддерживает Powershell ниже 5.0, на старых машинах обязательно нужно ставить новый Powershell, если хотите использовать его.

Главным минусом Windows Admin Center в микро инстансах является потребление оперативной памяти сервера. Он создает четыре сессии по 50-60 мегабайт каждая, и каждая эта сессия остается даже после закрытия Windows Admin Center.

Та же самая проблема и с Powershell через Enter-PSSession, он так же создает новую сессию, и если просто закрыть окно терминала, сессия весом и 70 мегабайт так и останется на удалённом сервере, если её не закрыть её перед выходом с помощью Exit-PSSession или Remove-Pssession.
При использовании Windows Admin Center с этим придется мириться, он отнимет около 170 мегабайт ОЗУ, RSAT таким не страдает.

Упрощаем работу

Максимальное удобство управления достигается если ваша рабочая станция, на которой установлен WAC находится в домене. Он берет учетные данные пользователя, который зашел в систему, подключение к серверам осуществляется по одному щелчку мыши.

Импортировать список серверов можно с помощью txt файла, перечислив имена серверов переносом строки, как и в RSAT.

Что тоже радует, ранее, чтобы интегрировать в AD виртуальную машину на Server Core, приходилось делать это через sconfig, а это значит нужен прямой доступ к его экрану. В случае с хостингами приходилось делать все это через VNC. Теперь, при переходе на главную страницу можно нажать «Изменить идентификатор компьютера» и ввести в домен.

Кстати, чтобы ввести в домен Windows Server 2019, больше не требуется делать Sysprep, потому что Sysprep тоже нужно было завершать через VNC.

Чтобы изменить сетевые настройки теперь нужно сделать два клика. Подключаешься к серверу и меняешь.

Это выходит так же быстро, как и через WinRM, только одной рукой.

Повышаем безопасность

На текущий момент есть четыре типа развертывания. Локальный, в качестве шлюза, установка на один из продакшн серверов и в составе кластера.

*Картинка с сайта майкрософт

Установка в качестве шлюза, на отдельный сервер, наиболее безопасный и рекомендуемый вариант. Это аналог схемы с VPN, когда доступ к управлению имеется только с определенного IP адреса или участка сети.

Согласитесь, гораздо удобнее держать на одной вкладке видосы и мемасы, а на другой Windows Admin Center, нежели целиком терять подключение к ютубу из-за входа в защищенную сеть.
Как же обезопасить все свои N серверов? С помощью следующего скрипта:

Этот скрипт изменит стандартные правила брандмауэра таким образом, что вы сможете использовать RDP и WinRM только с определенного IP адреса, понадобится для организации безопасного доступа к инфраструктуре.

Powershell в Windows Admin Center не имеет своей среды сценариев аналогичной Powershell ISE, можно только вызывать готовые скрипты.

Кстати, вот так выглядит RDP на Windows Server Core.

Выводы

На текущий момент Windows Admin Center не способен заменить RSAT, однако в нём уже присутствуют функции, которых нет у RSAT. Добавляются старые оснастки, которые не так удобны для управления через браузер.

Странным является приоритет разработки, наиболее активно добавляются функции интегрированные с Azure, хостингом от Майкрософт, вместо реально полезных функций.
К сожалению, пока что, управлять всеми функциями Windows Server с удобствами можно только подключившись к нему по RDP.

Не смотря на все минусы, у Windows Admin Center есть свой SDK, с помощью которого можно писать свои собственные модули и управлять своим собственным ПО через него, что однажды сделает его лучше RSAT.

Источник

Оцените статью