Posts

Showing posts from September, 2016

Computer Monitor Inventory Data Query

Greetings Folks! Today's post is going to talk about computer monitor inventory data. While I have found a good post from a Technet blog to get you started, I've had to modify the query referenced in that blog. As I found their query to be a bit on the broken side. So naturally I fixed it. Also you don't have to go through the whole modifying the mof file to collect the monitor data. There is actually already a WMI class in windows so you just have to go into the default client settings for hardware inventory and add/select the class. The class you need is WMIMONITORID The neat thing about this WMI class is that the monitor model is stored in ASCI numeric comma separated values. So you get to convert it letter by letter (or should I say two numbers by two numbers). In order to do the conversion, we are using a cursor. While some of you SQL experts out there may say that this is not the most elegant method. It gets the job done, be it a bit slowly. Anyways now to

Powershell to submit unidentified software in SCCM Asset Intelligence

Hello folks Have you ever thought "There's got to be an easier way than doing 100 at a time" when you are choosing software to upload to MSFT for AI identification? Well then you are in luck for here is a little something to make it easier on you. *Common note, please make sure you control how many you do. Otherwise you will probably overload things. Get the AI Software objects that are unknow. $wsql = "Select * from SMS_AISoftwareList Where State = 4" $output = Get-WmiObject -Query $wsql -Namespace "root\sms\site_code" -ComputerName "YourServer" Then just add your logic for looping the update. foreach ($app in $output) {    ([wmiclass]'\\YourServer\root\sms\site_code:SMS_AISoftwareList').SetCategorizationRequest($app.SoftwareKey)   } Now you can just sit back and watch the provider log roll. However it is a better idea to only do the apps that you know need to be uploaded. So you can add items to your query to remove

Using Powershell for automating Software Updates

Found a really neat blog from another blog that I found really neat and useful. I recommend you give it a read. From how he is doing it, you could easily combine it with a script that reads from another server/update group and use it to "copy" the update setup/deployment from one to another. Great idea for handling your test/dev machines. Give it a read at: http://www.dexterposh.com/2014/06/powershell-sccm-2012-automate-patching.html

CI guts for App Catalog check

Greetings everyone! If you are following in my footsteps of exposing the App Catalog web services. Here are a few tibbits that could help you keep your services exposed. Create a CI and use the following in the detection method. $registryPath = "HKLM:\Software\Microsoft\SMS\PORTALWEB" $registryName = "PortalPath" $key = Get-ItemProperty -Path $registryPath -Name $registryName $FilePath = $key.PortalPath+"\default.aspx" $ConfigFile = $key.PortalPath+"\web.config" $WebConfig1 = [System.IO.File]::ReadAllText($ConfigFile) $WSDLVisble = $WebConfig1.Contains("<!--<remove name=""Documentation"" />-->") -or $WebConfig1.Contains("<!--<remove name=""Documentation""/>-->") -or (!($WebConfig1.Contains("<remove name=""Documentation"" />"))) Remediation (if you choose to be so brave). $registryPath = "HKLM:\Software\Micr