EzDevInfo.com

sccm interview questions

Top sccm frequently asked interview questions

Change sitecode SCCM agent on Linux

Is there any solution to change the SCCM agent sitecode for a Linux client without reinstalling it?

I found a vbs script for windows client: https://gallery.technet.microsoft.com/scriptcenter/Change-sccm-configmgr-cf6e0327/view/Discussions#content

But nothing for Linux.

I've tried seding sitecode with the new one in all XML files under /opt/microsoft without results, the agent got broken, of course.

Any idea?


Source: (StackOverflow)

Script to create ODBC connection

I need to deploy some software through SMS/SCCM and the software requires that an ODBC connection be created in Windows. The connection information I was given requires a user name and password. I have a batch script to import the connection information into the registry, however I don't know how to go about putting the user name and password in. I'd like to script this or put it in some kind of distributable package.

Thanks, -Mathew


Source: (StackOverflow)

Advertisements

SCCM 2007 collection Query, not approved machines with particular site code

I am trying to have a sccm 2007 collection query which can populate "not approved" and assigned to site code "AA1" - machines. Any suggestions ?


Source: (StackOverflow)

SCCM 2012 to distribute files (not application)

I want to use SCCM 2012 to distribute some files (not application, no executable there).

I know there is a way to create a batch file with xcopy command, and create a package to deploy that batch file to the clients. However, if I use xcopy I cannot leverage the BITS functionality and other benefits from SCCM.

Is this possible?


Source: (StackOverflow)

Distribute In-House iOS App through Microsoft Intune

We have developed an iOS app that we would like to distribute through Microsoft Intune.

We have already subscribed to the iOS Developer Enterprise program and created an In-House Distribution provisioning profile used to sign our application which is then deployed to Intune.

Using the portal Intune app installed from the Apple app store, our developed app is not displayed in the available app list.

What do we have to do to make our app visible in Intune in order to be installed?

Do we have to install the Distribution certificate somewhere in Intune?

Do we need to use the Intune app wrapping tool?

We already knew that we could view the app through safari, but I thought that, using the In-House Distribution provisioning, we could directly use the Intune App to distribute our production ready app.

We have other "still in development" iOS app that we distribute through Intune using a Development provisioning which we update by hand adding the Test devices.

Anyway, even accessing from Safari, the process of installing the deployed app fails.


Source: (StackOverflow)

Is there a way to start a PowerShell Runspace in a different User's Context?

I'm trying to build a script that will display a WPF window to a user indicating progress. The script itself will run from the system account, but will need to show progress to the end user. The script will be launched in the System account either through PSExec or SCCM (Note in both cases the initial script can't be run with 'user interaction' enabled. Yeah. I know. Its a requirement though).

Is there a way to create that window from the System context so that a user can interact with it? Alternatively, can a Runspace be opened in another User's context? Or are neither of these a viable route?


Source: (StackOverflow)

Install device driver inf via command line

I am working to deploy smart cards to our environment and the driver provided from the manufacturer is 3 files, a CAT,DLL,and INF. If I right click the INF and select install it works. I need to package this for SCCM so I tried to install via command line but I get installation failed every time. Below is the INF

 ; 
 ; HID Global Smartcard Minidriver inf for x64
 ;
 ;

 [Version]
 Signature="$Windows NT$"
 Provider=%VendorName%
 DriverVer=07/12/2007,1.0.0.14
 DriverPackageDisplayName="HID Global Minidriver"
 CatalogFile=hidcrdmx.cat
 Class="Smart Cards"
 ClassGuid={990A2BD7-E738-46c7-B26F-1CF8FB9F1391}

 [Manufacturer]
 %VendorName%=HIDGlobal,NTamd64

 [HIDGlobal.NTamd64]
 %HIDGlobalDeviceName%=HIDGlobal_Install,UMDF\ATR_3BFA1800FF8131FE454A434F5034314332303074  

 [DefaultInstall]
 AddReg=Minidriver_RegistryAdd
 CopyFiles=@hidcrdmx.dll
 CopyFiles=Syswow64_CopyFiles


 [HIDGlobal_Install]
 CopyFiles=@hidcrdmx.dll
 CopyFiles=Syswow64_CopyFiles

 [Syswow64_CopyFiles]
 hidcrdm.dll

 [SourceDisksNames]
 1=%MediaDescription%

 [SourceDisksFiles]
 hidcrdmx.dll=1
 hidcrdm.dll=1


 [Strings]
 VendorName="HID Global"
 MediaDescription="HID Global Smart Card Minidriver Installation Disk"
 CardKey="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\HID Crescendo C200"
 CardKey64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\HID Crescendo C200"
 HIDGlobalDeviceName="HID Crescendo C200"

 [Minidriver_RegistryAdd]
 HKLM, %CardKey%,"80000001",0x0,"hidcrdmx.dll"
 HKLM,%CardKey%,ATR,0x00000001,3B,FA,18,00,FF,81,31,FE,45,4A,43,4F,50,34,31,43,32,30,30,74
 HKLM, %CardKey%,ATRMask,0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff  
 HKLM, %CardKey%,"Crypto Provider",0x0,"Microsoft Base Smart Card Crypto Provider"
 HKLM, %CardKey%,"Smart Card Key Storage Provider",0x0,"Microsoft Smart Card Key Storage Provider"
 HKLM, %CardKey64%,"80000001",0x0,"hidcrdm.dll"
 HKLM, %CardKey64%,ATR,0x00000001,3B,FA,18,00,FF,81,31,FE,45,4A,43,4F,50,34,31,43,32,30,30,74
 HKLM, %CardKey64%,ATRMask,0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff  
 HKLM, %CardKey64%,"Crypto Provider",0x0,"Microsoft Base Smart Card Crypto Provider"
 HKLM, %CardKey64%,"Smart Card Key Storage Provider",0x0,"Microsoft Smart Card Key Storage Provider"


 [DestinationDirs]
 DefaultDestDir = 11 ; dirid = \system32 on WinNT platforms
 Syswow64_CopyFiles=10,syswow64 ; %windir%\syswow64 on x64

Source: (StackOverflow)

SCCM 2007 SQL Query

I need some help writing an SQL query and I am not well versed in this by any means. I am trying to find computer hardware on systems that have software installed with a display name of, lets just say, "TestMe". Here is the SQL code:

SELECT dbo.v_GS_ADD_REMOVE_PROGRAMS_DispalyName0, SYS.Netbios_Name0, Processor.Name0, Processor.MaxClockSpeed0, Processor.DeviceID0
FROM v_R_System SYS
JOIN v_GS_PROCESSOR Processor on SYS.ResourceID=Processor.ResourceID
JOIN dbo.v_GS_ADD_REMOVE_PROGRAMS
WHERE v_GS_ADD_REMOVE_PROGRAMS_DisplayName0 LIKE %TestMe%
ORDER BY SYS.Netbios_Name0

When I execute this, I keep getting the following error:

Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'WHERE'.

I greatly appreciate your help. Thanks everyone.


Source: (StackOverflow)

Are there any requirements for .msi and .exe installers for SCCM?

I have a small application that is designed to run under currently logged on, non-administrative workstation user. Application can be installed manually but I also made sure that it is compatible with Group Policy Objects (GPO) software distribution method - I have .msi files for old systems (XP/Vista): separate files for per machine and per user installations as well as .msi file that takes advantage of Windows 7 (and newer) compatibility with WIX Allusers=2 option to allow automatic registry and folder path redirection depending on the installation context.

All is good there, but I am just wondering, is there anything special I need to do to make my installer suitable for installation using Microsoft System Center Configuration Manager? I do not really have resources to just test such a scenario myself and would like to find out about theoretical requirements for installer files for SCCM.


Source: (StackOverflow)

Sccm report for showing when software was last used

I am creating a report to find computers on our network that have certain software on it.

The report was working fine until i wanted to find out when the program was last used. When i added "LastUsedTime0" the result have increased.

I am not a coder and my scripts a trial and error of many scripts but it looks like the linking of the database is not correct (from my crystal reports experience).

Here is the script

=============================

SELECT s.Name0, DisplayName0, Publisher0, s.AD_Site_Name0, TopConsoleUser0, LastUsedTime0

FROM v_Add_Remove_Programs arp,V_R_system s, 
v_FullCollectionMembership fcm, 
v_GS_CCM_RECENTLY_USED_APPS rua,
v_GS_SYSTEM_CONSOLE_USAGE scu

WHERE fcm.CollectionID = 'SMS00001' and 
arp.ResourceID=fcm.ResourceID and 
arp.ResourceID=s.ResourceID and 
arp.ResourceID=rua.ResourceID and
arp.ResourceID=scu.ResourceID and


(
DisplayName0 like 'Microsoft Office%' and
DisplayName0 not like '%Excel%' and
DisplayName0 not like '%database engine%' and
DisplayName0 not like '%slide%' and
DisplayName0 not like '%frontpage%' and
DisplayName0 not like '%SharePoint%' and
DisplayName0 not like '%Live%' and
DisplayName0 not like '%PowerPoint%' and
DisplayName0 not like '%Word%' and
DisplayName0 not like '%XML%' and
DisplayName0 not like '%Communicator%' and
DisplayName0 not like '%SR-1%' and
DisplayName0 not like '%Resource%' and
DisplayName0 not like '%Visio%' and
DisplayName0 not like '%Web%' and
DisplayName0 not like '%XP%' and
DisplayName0 not like '%Sounds%' and
DisplayName0 not like '%OneNote%' and
DisplayName0 not like '%Click%' and
DisplayName0 not like '%Primary%' and
DisplayName0 not like '%Standard%' and
DisplayName0 not like '%Connector%' and
DisplayName0 not like '%Pack%' and
DisplayName0 not like '%Add-in%' and
DisplayName0 not like '%Validation%' and
DisplayName0 not like '%Components%' and
DisplayName0 not like '%Proof%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Service%' or
DisplayName0 like 'Microsoft Project%' and
DisplayName0 not like '%Pack%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Service%' or
DisplayName0 like 'Microsoft Access%' and
DisplayName0 not like '%engine%' and
DisplayName0 not like '%Runtime%' and
DisplayName0 not like '%Standard%' and
DisplayName0 not like '%Connector%' and
DisplayName0 not like '%Pack%' and
DisplayName0 not like '%Add-in%' and
DisplayName0 not like '%Validation%' and
DisplayName0 not like '%Components%' and
DisplayName0 not like '%Proof%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Service%' or
DisplayName0 like 'Microsoft Project%' and
DisplayName0 not like '%Pack%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Trial%' and
DisplayName0 not like '%Service%' or
DisplayName0 like 'Microsoft Access%' and
DisplayName0 not like '%engine%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Service%' or
DisplayName0 like 'Microsoft Visio%' and
DisplayName0 not like '%Pack%' and
DisplayName0 not like '%MUI%' and
DisplayName0 not like '%Viewer%' and
DisplayName0 not like '%Service%' 
)

GROUP BY DisplayName0, Publisher0, s.AD_Site_Name0, s.Name0, LastUsedTime0, TopConsoleUser0

ORDER BY Publisher0

===========================

This script is probably not even the best way to do what i want to do so any suggestions would be great.

thanks heaps for your time.


Source: (StackOverflow)

Intel SCS Hardware Inventory Information

I have recently installed the Intel SCS Addon for SCCM 2012 which is functioning as intended. We required this as SCCM OOB Management out of the box does not support >= AMT 9.0.

I have imported the MOF File that ships with Intel SCS, however when running the hardware inventory on configured machines, I get the following "RegKeyToMOF_32" entries on some of the items (Intel_AMT_ConfigurationInfo_Certificates, TLS Settings etc).

enter image description here

It seems that the MOF is configured to only look at 32 bit registry entries, as navigating to the x64 registry keys on the target machine reveals that information for those items exists.

Has anyone run into the same issue? I haven't been able to locate any Intel documentation that deals with alternate configurations for x64 redirected registries.

Intel SCS Version: 9.0.23.10

Intel SCS SCCM Addon Version: 2.0.22.319


Source: (StackOverflow)

My SCCM 2007 SQL Web Report is not displaying results

I created an SCCM SQL report using SQL Management Studio. I then created the following prompts for my Asset Management Office to use on the web report: Publisher, Display Name, and Version.

The Display Name and the Version prompts are both optional.

I receive no syntax errors or anything, but I receive absolutely no results whatsoever when I click on the Display button to produce the web report.

Here is my SQL code:

==================================================================================

SELECT dbo.v_R_System.Netbios_Name0, dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0, dbo.v_GS_ADD_REMOVE_PROGRAMS.Version0, dbo.v_GS_ADD_REMOVE_PROGRAMS.Publisher0

FROM dbo.v_R_System INNER JOIN dbo.v_GS_ADD_REMOVE_PROGRAMS ON dbo.v_R_System.ResourceID = dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID

WHERE dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 = @DisplayName AND dbo.v_GS_ADD_REMOVE_PROGRAMS.Version0 = @Version AND dbo.v_GS_ADD_REMOVE_PROGRAMS.Publisher0 = @Publisher

Order by dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 ASC

==================================================================================

I run my report and in the Publisher prompt, I type in something like %Autodesk% and then I click the Display button, and absolutely nothing is displayed. I can go to another report and look up Autodesk products, but not this one. I am not a well versed SQL guy, so if anyone can help me that would be great.

Thanks


Source: (StackOverflow)

How do I get around the case sensitivity of the Replace string method?

I'm moving the content source of pretty much everything in SCCM to a DFS share, and so I've got to change the source path for everything in the environment, and for the most part, I've got it coded out. There's some improvements I'd like to make, to clean up the code before I hit the big red button though.

For example, Powershell's .Replace method is case sensitive, and there are occasions where someone used uppercase in the server name in only PART of the name.

\\typNUMloc\ can be \\typNUMLOC\ or \\TYPNUMloc\ or \\TYPNUMLOC\. This makes for extra large If statements.

One of my functions is for the Drivers (not the Driver Packages, that I've tested with similar code, and I have only one mistyped path). Big Red Button commented out for safety.

$DriverArray = Get-CMDriver | Select CI_ID, ContentSourcePath | Where-Object {$_.ContentSourcePath -Like "\\oldNUMsrv\*"}
    Foreach ($Driver in $DriverArray) {
        $DriverID = $Driver.CI_ID
        $CurrPath = $Driver.ContentSourcePath

        # Checks and replaces the root path
        If ($CurrPath -split '\\' -ccontains 'path_dir') {
            $NewPath = $CurrPath.Replace("oldNUMsrv\path_dir","dfs\Path-Dir")
            #Set-CMDriver -Id $DriverID -DriverSource $NewPath
        } ElseIf ($CurrPath -split '\\' -ccontains 'Path_dir') {
            $NewPath = $CurrPath.Replace("oldNUMsrv\Path_dir","dfs\Path-Dir")
            #Set-CMDriver -Id $DriverID -DriverSource $NewPath
        } ElseIf ($CurrPath -split '\\' -ccontains 'Path_Dir') {
            $NewPath = $CurrPath.Replace("oldNUMsrv\Path_Dir","dfs\Path-Dir")
            #Set-CMDriver -Id $DriverID -DriverSource $NewPath
        } Else {
            Write-Host "Bad Path at $DriverID -- $CurrPath" -ForegroundColor Red
        }

        # Checks again for ones that didn't change propery (case issues)
        If ($NewPath -like "\\oldNUMsrv\*") {
            Write-Host "Bad Path at $DriverID -- $CurrPath" -ForegroundColor Red
        }
    }

But as you can tell, that's a lot of code that I shouldn't need to do. I know, I could use the -replace or -ireplace methods, but I end up with additional backslashes (\\dfs\\Path-Dir) in my path, even when using [regex]::escape.

How can I use an array of the different paths to match against the $CurrPath and perform the replace? I know it doesn't work, but like this:

If ($Array -in $CurrPath) {
    $NewPath = $CurrPath.Replace($Array, "dfs\Path-Dir"
}

Source: (StackOverflow)

Powershell script to update Java to latest version

We have an application that is Java dependent that we are working on a SCCM installer to push out to clients.

Due to Java being updated almost monthly (and the old updates expiring 30 days thereafter) we're looking for a way to have the SCCM installer stay updated with the latest Java version. We have the ability to run a Powershell script from our SCCM installer, but we haven't found a way to write a script that will automatically download and install the latest Java version.

Does anyone know if this is possible, and how we could go about it?

Thanks in advance!!


Source: (StackOverflow)

How to detect if SCCM 2012 is installed?

I am writing a Wix C++ Custom Action to detect if SCCM 2012 is installed. I am doing this by reading the product GUID from the registry: SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\

But this didn't work as on the system where SCCM 2012 was installed there was no such information in the registry.

Can anyone please point me in the correct direction to achieve this?

I would like to install my software only when SCCM 2012 is installed.


Source: (StackOverflow)