| external help file | Cofl.OSDManagement-help.xml |
|---|---|
| Module Name | Cofl.OSDManagement |
| online version | |
| schema | 2.0.0 |
Updates the ActiveDirectory state of one or more computers, including whether the computer is staged or unstaged.
Set-OSDComputerState [-Identity] <OSDComputerBinding[]> [-State <String>] [-CreateADComputerIfMissing]
[-OrganizationalUnit <String>] [-MoveADComputer] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OSDComputerState [-Identity] <OSDComputerBinding[]> [-Staged] [-CreateADComputerIfMissing]
[-OrganizationalUnit <String>] [-MoveADComputer] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OSDComputerState [-Identity] <OSDComputerBinding[]> [-Unstaged] [-CreateADComputerIfMissing]
[-OrganizationalUnit <String>] [-MoveADComputer] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
The Set-OSDComputerState cmdlet updates the state of one or more computers in ActiveDirectory. The state managed by this cmdlet includes the OrganizationalUnit the computer is in and whether or not the computer is staged or unstaged. This operation will fail if there is no corresponding ActiveDirectory object for a computer and the -CreateADComputerIfMissing switch is not provided.
At least one state change operation must be provided (create, move, or set staged state); otherwise, a warning will be displayed and no action will occur.
Set-OSDComputerState -Identity 1234 -State Staged -CreateADComputerIfMissing
Stage the computer 1234, creating it if it doesn't exist.
Get-OSDComputer | Set-OSDComputerState -CreateADComputerIfMissing
Create ActiveDirectory objects for all computers in the MDT database if they don't exist.
Set-OSDComputerState -Identity 1234 -State Unstaged
Unstage the computer 1234.
Set-OSDComputerState -Identity 1234 -Staged
Stage the computer 1234.
Set-OSDComputerState -Identity 1234 -Unstaged
Unstage the computer 1234.
A computer object or identity, such as the name, the asset tag, the MAC address, or the object retrieved by Get-OSDComputer.
Type: OSDComputerBinding[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseA task sequence, either a string ID or one retrieved by Get-OSDTaskSequence.
Type: String
Parameter Sets: ByState
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf the computer should be able to PXE boot.
Type: SwitchParameter
Parameter Sets: ByStagedSwitch
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseIf the computer should not be able to PXE boot.
Type: SwitchParameter
Parameter Sets: ByUnstagedSwitch
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseIf a computer object does not exist in ActiveDirectory, create it.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe computer will be created or moved to this OU.
Type: String
Parameter Sets: (All)
Aliases: OU
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf a computer is not the OU (default in the module private data), move it there.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalsePass through an updated copy of the computer.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.