johnli Posted April 7, 2016 Report post Posted April 7, 2016 Hi, I'm looking for a simple Poweshell script to delete computers from SCCM. I found various examples, but nothing seems to works well. Also this script from from Microsoft is not doing the trick for me : https://gallery.technet.microsoft.com/scriptcenter/Remove-old-Active-7fc40c61 Suggestions, examples is welcome ! Thanks! Quote Share this post Link to post Share on other sites More sharing options...
0 Peter33 Posted April 7, 2016 Report post Posted April 7, 2016 [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. Quote Share this post Link to post Share on other sites More sharing options...
0 johnli Posted April 8, 2016 Report post Posted April 8, 2016 supert! Just what i Need ! Thanks! Quote Share this post Link to post Share on other sites More sharing options...
Hi,
Share this post
Link to post
Share on other sites