Skip to content

Powershell – Delete Computer from SCCM

Featured Replies

[cmdletbinding()]
Param(
    [Parameter(Mandatory)]
    [String]
    [ValidateNotNullOrEmpty()]
    $ComputerName
)

cls

$SiteCode = "XXX"

Import-Module -Name "$(split-path $Env:SMS_ADMIN_UI_PATH)\ConfigurationManager.psd1"
cd $SiteCode":"

Remove-CMDevice -DeviceName $ComputerName -Confirm:$false -Verbose -Force

This should do the trick. The SCCM Console has to be installed on the computer. Also make sure you replace the site code in the script with your own.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.