Remove-DAAppServer
Remove-DAAppServer
Removes the specified list of application server security groups (SGs) from the DirectAccess (DA) deployment, removes the specified application servers from the specified DA application server SG,and removes the application server Group Policy Objects (GPOs) in the specified domains.
Sintaxis
Parameter Set: AppServerSGGpo
Remove-DAAppServer [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-DomainName <String[]> ] [-PassThru] [-SecurityGroupNameList <String[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: AppServerFromSGGpo
Remove-DAAppServer [-Name] <String[]> [-SecurityGroupName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-DomainName <String[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The Remove-DAAppServer cmdlet removes the specified list of application server security groups (SGs) from the DirectAccess (DA) deployment, removes the specified application servers from the specified DA application server SG,and removes the application server Group Policy Objects (GPOs) in the specified domains. This cmdlet is not applicable when DA is deployed only for the management of remote clients.
The basic paradigm is that all application server GPOs always contain all SGs even if all the corresponding domains are not represented in all the SGs. There will never be a scenario where an SG is present only in some of the GPOs. If this happens, then it means that the configuration is in a bad state.
The application server SG and GPO parameters are treated as independent entities. A user can remove application server GPOs independent of the SGs and the domains where these SGs exist. Every SG that is removed from the DA deployment is removed from all application server GPOs currently present.
The following additional capabilities of this cmdlet justify its need though AD cmdlets are already available for the deletion of SGs and GPOs.
-- When an SG is removed it is removed in all GPOs. Additionally, if user does not have permissions to edit a GPO the SG is not removed from any of the GPOs. When using the AD cmdlet user would have to carefully ensure that it is run for each of the domains and it is difficult to handle the case where he does not have permissions on some domains.
-- With the above described paradigm there is still a need to parse an SG to remove independent application servers in the SG because every application server has a unique IP address that is used in the client policy that needs to be removed. This functionality is handled by this cmdlet.
-- When a GPO is removed all SGs are removed from the GPO and the application server specific policies are also removed. The cmdlet takes care of the conditions where the GPO is removed only if it was originally created at the time of adding. If the GPO is already present at the time of adding, then it is merely edited.
App Server configuration is a global configuration and is applicable to all DA servers in the enterprise deployment even when there is multi-site enterprise deployment.
Following are additional behavioral notes for this cmdlet.
-- If a nested SG has to be removed, then the cmdlet recursively parses the SG so that all servers are retrieved and policies can be removed accordingly.
-- Removing a domain deletes the application server GPO only if it was created at the time of addition. If it was already present, then only the DA related policies and settings are wiped out and the GPO is left intact.
-- Deletion of all app server GPOs and SGs is a permitted operation.
-- When removing SGs if the user does not have the permissions to configure even one app server GPO among the many that might be present, then this cmdlet terminates the processing of the entire list of SGs specified. However, this cmdlet still processes any GPOs that the user might have specified to remove.
-- When removing GPOs if the user does not have the permissions to remove or configure one of the specified GPOs, then the cmdlet still proceeds with the processing of the remaining GPOs in the list.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ComputerName<String>
Specifies the IPv4 or IPv6 address, or host name, of the computer on which the Remote Access server computer specific tasks should be run.
Alias |
Cn |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-DomainName<String[]>
Specifies the list of domains from which application server GPOs need to be removed. A domain is specified in the DOMAIN
format.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Name<String[]>
Specifies the list of application servers that have to be deleted from the DA deployment. The servers are specified by using the host names and are deleted from the SG specified by the SecurityGroupName parameter. The servers cannot be specified by their IPv4 or IPv6 addresses.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PassThru
Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-SecurityGroupName<String>
Specifies the name of a SG that is already part of the DA deployment from which the specified list of app servers should be deleted. Specified in DOMAIN\SG_NAME
format.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
3 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-SecurityGroupNameList<String[]>
Specifies the list of application server SGs that are to be deleted from the DA deployment. Each SG is specified in DOMAIN\SG_NAME
format.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
- None
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#DAAppServer
El objeto
Microsoft.Management.Infrastructure.CimInstance
es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#
) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
The DAAppServer object consists of the following properties:
-- The list of application server security groups each security group is specified in the Domain\GroupName format.
-- The list of application server GPOs: each GPO is specified in the Domain\GPOName format.
-- The properties of the connection to the application server.
-- Status of IPsec traffic protection: Enabled or Disabled.
Ejemplos
EXAMPLE 1
This example deletes the daAppServerGrp SG from all GPOs. In current setup, daAppServerGrp was the only SG present, therefore the application server GPO (such as corp.contoso.com\DirectAccess Application Server Settings) is also removed automatically.
PS C:\> Remove-DAAppServer -SecurityGroupNameList daAppServerGrp
EXAMPLE 2
This example deletes the computer named da-test-0807 from SG daAppServerGrp. The SG continues to be a part of DA Configuration.
PS C:\> Remove-DAAppServer -SecurityGroupName daAppServerGrp -Name "da-test-0807"
EXAMPLE 3
This example removes the application server GPO in the DA configuration from the corp.contoso.com domain.
PS C:\> Remove-DAAppServer -DomainName "corp.contoso.com"