Jump to content


bostonrake

Established Members
  • Posts

    21
  • Joined

  • Last visited

bostonrake's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I figured it out! The following blog told me the piece I was missing... AD System Group Discovery! http://consulting.risualblogs.com/blog/2011/01/24/creating-collections-in-sccm-based-on-active-directory-ou-membership/ Thanks, Doug
  2. Hello, I'm trying to create collections based on our OU structure and have the computers automatically populate into the collection based on the OU they are in. I found this great guide to help me do it... http://jimmoldenhauer.blogspot.com/2013/06/sccm-2012-creating-device-collections.html I know that guide is for 2012 and I'm on 2007, but it is relatively the same process. The issue I'm having is that my SCCM environment is not picking up all my OUs. It seems it is not picking up the new OUs I put in place several months ago. The step that says, "You will be presented with all of the available OU's in your Active Directory structure. In the case of this lab we only have Domain Controllers and Servers (manually created). We highlight Servers and Click OK" is only displaying my older OUs. What do I need to do to get SCCM to see my newer OUs I put in place months ago? Thanks, Doug
  3. I need help with creating script to uninstall Quicktime. I'm pretty comfortable with creating a package in SCCM, but I can't find info on how to remove Quicktime via command line or some other means. Thanks!
  4. Hello, I have collections that show me virtual servers and I'm curious if I can create something to show me our physical servers. I've inherited sccm and I know little to nothing about it. Is there a simple query statement to show me all our physical servers? Thanks!
  5. I'm curious if there is a way to setup a SCCM 2007 package to be pulled? In other words, techs in my office could pull up the agent and some how have a package or 2 that I setup where they could pull it from SCCM. Or is this just a 2012 feature? Thanks, Doug
  6. I finally got this to work! Long story short, my batch file has a script at the beginning to get admin/elevation rights. It looks like this... @Echo Off Setlocal :: First check if we are running As Admin/Elevated FSUTIL dirty query >nul if %errorlevel% EQU 0 goto START ::Create and run a temporary VBScript to elevate this batch file Set _batchFile=%~f0 Set _Args=%* :: double up any quotes Set _batchFile=""%_batchFile:"=%"" Set _Args=%_Args:"=""% Echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\~ElevateMe.vbs" Echo UAC.ShellExecute "cmd", "/c ""%_batchFile% %_Args%""", "", "runas", 1 >> "%temp%\~ElevateMe.vbs" cscript "%temp%\~ElevateMe.vbs" Exit /B :START :: set the current directory to the batch file location cd /d %~dp0 :: Place the code which requires Admin/elevation below Echo We are now running as admin [%1] [%2] There is another one that works you can find here... http://www.techgainer.com/create-batch-file-automatically-run-administrator/ That site takes awhile to load... it has some stupid snow animation. Anyway, the above alone was not enough. I also had to edit the office scrub vbs file. I found the information on that here... http://www.windowsmanagementexperts.com/article-for-this-week/article-for-this-week.htm Hopefully this helps someone in the future! Thanks, Doug
  7. Hey all, First, I posted this in a thread I started about a different batch file. I figure this one warrants its own thread. Hopefully that is ok! Anyway, I worked on this all day yesterday and I still can't get it to run. I have changed it to run locally instead of from the dp. I moved the batch file to the folder containing all the contents. Here is a look at the folder... You can ignore the "Batch for SCCM" folder as that was my testing folder for awhile. I'm now trying to run sccm_remove2010_install_2013.bat. The contents are... echo cd %~dp0 setlocal :DeployOffice call cscript OffScrub10.vbs ProPlus /bypass 1 /q /s /NoCancel start /wait setup.exe /configure proplus.xml :End Endlocal When I manually run this from c:\windows\syswow64\ccm\cached\packagefolder, it runs fine. However, I cannot get SCCM to run it. When I run it manually it changes the directory to the package folder located in c:\windows\syswow64\ccm\cached so it is able to run the files in the batch. I cannot figure out for the life of me why it doesn't run in SCCM... and I've looked at execmgr.log and it appears to call it fine, but nothing ever happens on the machine. Any ideas? Thanks, Doug
  8. Hey all, I've been working on this all day and I still can't get it to run. I have changed it to run locally instead of from the dp. I moved the batch file to the folder containing all the contents. Here is a look at the folder... You can ignore the "Batch for SCCM" folder as that was my testing folder for awhile. I'm now trying to run sccm_remove2010_install_2013.bat. The contents are... echo cd %~dp0 setlocal :DeployOffice call cscript OffScrub10.vbs ProPlus /bypass 1 /q /s /NoCancel start /wait setup.exe /configure proplus.xml :End Endlocal When I manually run this from c:\windows\syswow64\ccm\cached\packagefolder, it runs fine. However, I cannot get SCCM to run it. When I run it manually it changes the directory to the package folder located in c:\windows\syswow64\ccm\cached so it is able to run the files in the batch. I cannot figure out for the life of me why it doesn't run in SCCM... and I've looked at execmgr.log and it appears to call it fine, but nothing ever happens on the machine. Any ideas? Thanks, Doug
  9. I think my issue has more to do with the system account not having access to \\servername\pkg\office365\ I'm not sure how to change the process. I guess I will try letting it copy the content to the dp and then cache it locally to run from there. Thanks, Doug
  10. OK, I got this one working. I "think" it is working now because I told it to run from the distribution point and use unc path. Although I don't know for sure because I don't understand all those settings and the restrictions of each in regards to batch files. Now I have another one I'm trying today and it doesn't seem to run. This one is to uninstall Office 2010 and to install Office 2013 (365). The batch works fine in our testing when we run it manually. Once again, my ccm package doesn't seem to work. Here is the batch file... --------------------- setlocal :DeployOffice call cscript \\servername\pkg\office365\OffScrub10.vbs ProPlus /bypass 1 /q /s /NoCancel start /wait \\servername\pkg\office365\setup.exe /configure \\servername\pkg\office365\proplus.xml :End Endlocal --------------------- Everyone has access to the server. The execmgr.log doesn't offer much help... I don't see anything that looks like an error, but I do see it calling for the package. Any suggestions on how I should set this one up? Run from distribution? Run locally? UNC or drive letter needed? Thanks, Doug
  11. I think I finally got it working. I will post the details tomorrow.
  12. Thanks so much for the detailed reply. I made a batch file based off your code and it worked when I ran it from the server. However, like my original batch file, it is not working via SCCM. Here some of the execmgr.log from my test machine. <![LOG[Download content and mapped drive required. SC120145 - UltraVNC Uninstall DD not acceptable by client]LOG]!><time="15:43:52.693+360" date="01-21-2016" component="execmgr" context="" type="2" thread="5060" file="softdistpolicy.cpp:825"> <![LOG[OnPolicyActivation FindUserOrSystemPolicy returns invalid policy]LOG]!><time="15:43:52.693+360" date="01-21-2016" component="execmgr" context="" type="2" thread="5060" file="execreqmgr.cpp:7154"> <![LOG[Mandatory execution requested for program UltraVNC Uninstall DD and advertisement SC120145]LOG]!><time="15:43:52.694+360" date="01-21-2016" component="execmgr" context="" type="1" thread="4776" file="execreqmgr.cpp:3317"> <![LOG[Creating mandatory request for advert SC120145, program UltraVNC Uninstall DD, package SC1000AF]LOG]!><time="15:43:52.694+360" date="01-21-2016" component="execmgr" context="" type="1" thread="4776" file="execreqmgr.cpp:3440"> <![LOG[Download content and mapped drive required. SC120145 - UltraVNC Uninstall DD not acceptable by client]LOG]!><time="15:43:52.708+360" date="01-21-2016" component="execmgr" context="" type="2" thread="4776" file="softdistpolicy.cpp:825"> <![LOG[CreateMandatoryRequestRecursively reject invalid policy UltraVNC Uninstall DD]LOG]!><time="15:43:52.708+360" date="01-21-2016" component="execmgr" context="" type="2" thread="4776" file="execreqmgr.cpp:3480"> <![LOG[Download content and mapped drive required. SC120145 - UltraVNC Uninstall DD not acceptable by client]LOG]!><time="15:43:52.712+360" date="01-21-2016" component="execmgr" context="" type="2" thread="4776" file="softdistpolicy.cpp:825"> <![LOG[RaisePolicyStateStatusMessage - invalid policy received]LOG]!><time="15:43:52.712+360" date="01-21-2016" component="execmgr" context="" type="2" thread="4776" file="execreqmgr.cpp:368"> "mapped drive required" is some of the messages I was seeing yesterday before I started this thread. I'm missing something somewhere when I'm creating the package in sccm. Thanks, Doug
  13. Hey all, I'm trying to run a batch file that will uninstall Ultra VNC. When I run it from the computer locally or even from a server location, it works fine. I created the package in SCCM like I would for just about any other install package, but it doesn't work. I have tried several settings... drive letter, unc path, run from distribution point, run locally, etc... and several combinations of those settings. I have read quite a bit on the net, but I'm still at a loss. I think I need to be using %~dp0 Here is what the batch looks like now... if exist "C:\Program Files (x86)" goto 64bit goto 32bit :32bit c: cd \program files\ultravnc unins000.exe /VERYSILENT /NORESTART cd \program files\uvnc bvba\ultravnc unins000.exe /VERYSILENT /NORESTART taskkill /F /IM winvnc.exe :64bit c: cd \program files (x86)\ultravnc unins000.exe /VERYSILENT /NORESTART cd \program files (x86)\uvnc bvba\ultravnc unins000.exe /VERYSILENT /NORESTART taskkill /F /IM winvnc.exe Basically it goes to 2 possible locations and runs the uninstall. Then I added a taskkill because in one test, winvnc.exe was still running even after it uninstalled. Anyway, that's not what this about. I'm just trying to get this batch to run via SCCM 2007. If I do need to use %~dp0, how would I do that with this batch file? I don't understand why that would be needed though... especially if I say to download the batch and run locally. Thanks, Doug
  14. Hello all, I have a query to show me what computers do not have a certain software installed. It returns the computer name and the last logged in user. I would like to add if the machine is 32 or 64 bit. The reason why is because I want to sort by 32/64 bit so I can easily select all the 32 bit machines for example and throw them into the proper collection to get the software. Here is the query I have... select SMS_R_System.NetbiosName, SMS_R_System.LastLogonUserName from SMS_R_System where SMS_R_System.ResourceId not in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Traps") and SMS_R_System.ResourceId not in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName = "Traps") order by SMS_R_System.NetbiosName Again, I just want to add a column that shows if the computer is 32 or 64 bit. Thanks, Doug
  15. Finally got it! Here is the query to show computers that do NOT have GlobalProtect for both 32 and 64 bit... select SMS_R_System.NetbiosName from SMS_R_System where SMS_R_System.ResourceId not in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "GlobalProtect") and SMS_R_System.ResourceId not in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName = "GlobalProtect") order by SMS_R_System.NetbiosName Now, how do I add the last logged on user to this? Right now I just have the computer name. Thanks, Doug
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.