Skip to content

Instantly share code, notes, and snippets.

#=============================================================================================================================
#
# Script Name: HardwareReadiness.ps1
# Description: Verifies the hardware compliance. Return code 0 for success.
# In case of failure, returns non zero error code along with error message.
# This script is not supported under any Microsoft standard support program or service and is distributed under the MIT license
# Copyright (C) 2021 Microsoft Corporation
## День добрый
## Сначала добавляете всем новую группу "Uvolennie" и делаете её дефолтной, потом отрываем все остальные.
##
## Как то так:
## Остановится в случае любой ошибки
$ErrorActionPreference = 'Stop'
## OU для поиска и изменения пользователей
$SearchBase = 'OU=Users,DC=domain,DC=local'