Jump to content


bostonrake

Established Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by bostonrake

  1. 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

  2. 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...
    Hopefully this helps someone in the future!
    Thanks,
    Doug
  3. 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...



    post-29990-0-66440900-1453756823.jpg



    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



  4. 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...

     

    post-29990-0-66440900-1453756823.jpg

     

    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

  5. 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
  6. 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
  7. 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
  8. 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

  9. 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

  10. I'm close... I think. I ran the following to show me systems that do have GlobalProtect for both the 32 and 64 bit versions....

     

    select SMS_R_System.NetbiosName from SMS_R_System where SMS_R_System.ResourceId 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") or SMS_R_System.ResourceId 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

     

    I then created another query and copied the above statement but added the "NOT" shown below...

     

    select SMS_R_System.NetbiosName from SMS_R_System where SMS_R_System.ResourceId 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") or 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

     

    The query that shows the computers that DO have it installed seems accurate... matter of fact it jives perfectly with the report from CCM when I use "Computers with specific software registered in Add Remove Programs"... the numbers are the exact same. So I'm confident the first query showing computers that have it is correct.

     

    However, the 2nd query where I tried to change it to show computers that do NOT have it, I don't think that is correct as it is showing more computers than we anticipate.

     

    Is there anyone that can take a look at my 2nd query? Again, I'm trying to find all computers that do NOT have GlobalProtect and it needs to include both 32 and 64 bit.

     

    Thanks,

    Doug

  11.  

    You create it the same way you created the one above. How exactly did you great that one?

    It was already in there. At first, I thought great, there is already a query to show me the computers that don't have GlobalProtect. However, after running it, we immediately knew it wasn't correct. Now that I know it is 32 bit only, I'm sure that is the problem. I have never created a query from scratch.

     

    Thanks,

    dd

  12. Hello,

    I'm new to SCCM and 5 weeks into a new job. We have SCCM 2007 and several queries to help me out, but nothing seems accurate.

     

    There is this one query that is supposed to show all computers that do NOT have GlobalProtect. The query statement is...

     

    select SMS_G_System_SYSTEM.Name, SMS_R_System.LastLogonUserName, SMS_R_System.IPAddresses, SMS_G_System_COMPUTER_SYSTEM.SystemType from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.Name not in (select SMS_G_System_SYSTEM.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId 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") order by SMS_G_System_SYSTEM.Name

     

    When I click on the query, it finds hundreds of computers which we know is not accurate. Matter of fact, my laptop shows in the results and I have GlobalProtect installed.

     

    Could it be this statement isn't correct? Will this statement work for Windows 7 computers? I know absolutely nothing about CCM other than what it is capable of doing. I have been able to update some distributions, but so far that is about it.

     

    Thanks,

    Doug

  13. Hello all,

    I started a new job less than a month ago and I'm using SCCM 2007 for the first time in my life. I was tasked with finding what computers don't have a particular software. I went into SCCM and luckily I found a query that was already set to show computers that don't have this particular software installed. However, when I ran it, I knew immediately it wasn't accurate. For starters, way too many computers showed up. Second, my computer was in the list and I have the software.

     

    So at first I was looking at the query trying to make sense of it. I then ran a "All Client Systems" query which shows computer/server names along with the last logged on user. In looking at this list, I noticed it is no where close to accurate. The past weekend I had to shutdown our data center and I know I logged into several of the servers, but many of them still show the last logged on user was a guy that no longer works here and hasn't for over a month. One of the servers I just logged into 2 days ago, yet it still shows the guy that left over a month ago.

     

    With all that said, I feel I need to make sure our SCCM environment is in good health and is accurately getting data from the clients before I can produce any sort of reliable report. However, not ever having any training on SCCM and not having used it in the past, I don't even know where to start. I can tell you this... When I go to Site db > Site management > site >Site settings > Site maintenance > Tasks... all of the tasks are enabled except for Clean install flag and Bcacku ConfigMgr Site Server. However, I have no idea what any of the other one mean.

     

    Can someone at least point me in the right direction to getting my SCCM environment to being reliable?

     

    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.