Tag Archives: SCCM

Create New Device in SCCM Using Powershell

Creating a new device in SCCM using powershell with 2012 R1 requires using WMI as there is no cmdlet to do so, but thankfully this is easier now using the CIM cmdlets. Of course if you have 2012 R2 then use Import-CMComputerInformation (thanks @david_obrien) $SCCMSiteServer = ‘SiteServer.FQDN.com’ $SCCMNamespace = ‘Root\SMS\Site_AAA’ $MACAddress = ’00:11:22:33:44:55′ $DeviceName = ‘PCNAME001’ Invoke-CimMethod -ClassName “SMS_Site” -Namespace $SCCMNamespace -ComputerName $SCCMSiteServer -MethodName ‘ImportMachineEntry’ -Arguments @{ MACAddress = $MACAddress; NetbiosName = $DeviceName } As a bonus, here are some functions to create your devices along with basic validation of mac address NB. The “Stugr” in the function names is simply to avoid any clashes with official cmdlets function Format-StugrMACAddress { Param( [Parameter(Mandatory=$true)][string]$MACAddress ) # strip possible variations of dividers $MACAddress = $MACAddress.Replace(‘ ‘,”).Replace(‘:’,”).Replace(‘-‘,”) # mac address must be 12 characters (with no dividers) and hexadecimal if($MACAddress.Length -eq 12 -and $MACAddress -match “^[A-Fa-f0-9]+$”) { return ($MACAddress -replace “(..(?!$))”,’$1:’) # insert … Continue reading

Posted in Technology | Tagged , , , | Leave a comment

How to deploy Java (JRE)

Download offline installers: http://www.java.com/en/download/manual.jsp Start the exe In explorer, navigate to: C:\Users\%username%\AppData\LocalLow\Sun\Java\ Grab a copy of the .cab and .msi Cancel the install Download this .mst (The .mst will agree to licence, disable updates etc) Deploy using your system of choice such as Group Policy or SCCM, making sure to apply the .mst

Posted in Technology | Tagged , , , , , , , | 1 Comment