Posts

ConfigMgr Exclude computer from collection if in two groups

Found this old article from Matthew Hudson  about testing if a computer is in two group. Thanks Matthew! While he mention groups and OUs, his example was OU only. So here is the modified for Groups. Works like a charm! If the computer is in both groups, it's excluded from the collection. This is useful if you've got non admins managing group memberships. select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.SecurityGroupName = "domain .local\\groupB" ) and SMS_R_System.SecurityGroupName =...

Reset the Computer Account Password, Don't Rejoin the Domain

Just another tip I forgot Sometimes the Computer Password gets hosed and you can't log on with a Domain Account.  Rather than remove from the domain and rejoin it, just reset the computer password from an elevated command prompt. RESET Computer Password  (Don't Rejoin to Domain) C:\> netdom.exe resetpwd /s:yourDomainCtrlr.domain.com  /ud:YourDAAccount /pd:*

Random Notes from the field - Stuff to remember

Here's a bunch of random notes of Windows stuff that I wanted to remember ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get User who's logged on remotely WMIC /NODE: "hostname"  COMPUTERSYSTEM GET USERNAME ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sysprep 'A fatal error occurred while trying to sysprep the machine.'  This error shows that sysprep was run multiple times on the machine, please open a command prompt, type: slmgr /dlv to view how many times of remaining Windows Activation count. Generally speaking, to sysprep the image on a single computer for multiple times, you need to configure the Microsoft-Windows-Security-SPP | SkipRearm to 1 in the unattend.xml file. I am assuming whether you configure the Microsoft-Windows-Security-Licensing-SLC | SkipRearm to 1 instead of SPP, the SLC setting is deprecated and should not be used.   As a work around of this problem, please type: regedit in the Start Search box to open Registry Editor, set the value of Ge...

Going old school with CommVault Simpana Data Interface Pairs

Image
Ok, today I had to go a little old school with CommVault. My quest, to add the new media servers to the Data Interface Pairs for some clients. I tried passing parameters, and either I was doing it wrong, or something didn't like the parameters. So OLD SCHOOL here we come.... The command line is   qoperation execscript -sn DataInterfacePairConfig -si add -si CLIENTNAME -si CLIENTIP -si tb-MEDIASERVERNAME -si MEDIASERVERIP Now I've seen this in other forums with the media server listed first and the client second. But after adding one manually that way, I noticed it was listed backwards from the way CommVault listed it when entered through the GUI. Note that you must specify both the NAME and IP of the Client and the Media Server So in my example : qoperation execscript -sn DataInterfacePairConfig -si add -si fileserv1 -si 192.168.5.10 -si cvmedia1 -si 192.168.5.2 Now for me... I created a batch script to run in this window called addpairs.bat simply listing all t...

Old School Export Local Group

Almost forgot some old school stuff I needed to export the Administrators group on a local server.... net localgroup Administrators > C:\temp\group.txt Dont forget the Temp directory must exist :-)

Modify Default Office 2013 Search With Bing to Google

Image
While there are some things I dislike in Office 2013 ( The limited "Office Theme" being one of them) One of the features in Office 2013 that I like is the "Search with" but by default it is set to "Search with Bing"  I would rather use Google. By two simple registry additions we can change this to "Search with Google" Open the registry editor  (start \ run \ regedit) Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\General 1) Right click in an open area of the right pane. Click New Select String Value Add the value name =   SearchProviderName Add the value data  = Google 2) Right click in the open area of the right pane again. Click New Select String Value Add the value name = SearchProviderURI Add the value data =   http://www.google.com/search?q= (Note the last letter in the value name is i as in indigo not l as in lima)

Old trick I forgot. Find the Computer OS / SP via CMD

Seems the older I get the more I forget. Here's a simple command to find the OS / Service Pack C:\Windows\system32>systeminfo | findstr /B /C:"OS Name" /C:"OS Version" OS Name:                   Microsoftr Windows Serverr 2008 Standard OS Version:                6.0.6002 Service Pack 2 Build 6002