Add-CMDeploymentType: How to add a file/folder detection method

Hello all,
I'm discovering how to add applications & deploymenttypes to my SCCM deployment through Powershell.
Adding the application went smoothly, but I'm struggling a bit at the deploymenttype.
I want to add a file/folder detection clause as you can in the admin console, but it seems that that the Add-CMDeploymentType cmdlet doesn't allow this..
Am I correct?
Can you only add a scripted detection clause to the deploymenttype?
For now I've just added the following Powershell detection clause:
Test-Path %PATH_TO_A_FILE_OF_THE_APP%
This will then return true after the application has installed.
Thanks for your insights on this!
Filip

Hello Christopher,
command I execute:
I've just tried what you suggested, but now the path to the detection script just gets put into the script content window, instead of the contents of the file..
http://sdrv.ms/1fx6wnN
This is the command I execute:
$NewDT=Add-CMDeploymentType
-ApplicationName
$AppName
-ScriptInstaller
-DeploymentTypeName
"Local Install"
-InstallationProgram
$DTProgram
-InstallationBehaviorType
$DTBehavior
-LogonRequirementType
$DTLogonReq
-ContentLocation
$DTContentLocation
-ManualSpecifyDeploymentType
-DetectDeploymentTypeByCustomScript
-ScriptType
Powershell
-ScriptContent
\\syn-sccm01\sources\SCCM\Packages\PSTest\GoogleEarthDetection.ps1
Should I quote that path somewhere?
Thanks!

Similar Messages

  • How to exclude a file/folder from Microsoft Security Essentials scan in Windows 7/Vista/XP?

    How to exclude a file/folder from Microsoft Security Essentials scan
    in Windows 7/Vista/XP?
    Hetti Arachchige V Aravinda | Network & System Administrator (B.Sc, Microsoft Small Business Specialist, MCP, MCTS, MCSA, MCSE,MCITP, CCNA, CEH, MBCS)

    Hi,
    Thanks for sharing this link.
    Nice job!
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • How to exclude a file/folder from Windows Defender malware scan in Windows 8/8.1?

    How to exclude a file/folder from Windows Defender malware scan in Windows 8/8.1?
    http://answers.microsoft.com/en-us/protect/wiki/protect_defender-protect_scanning/how-to-exclude-a-filefolder-from-windows-defender/f32ee18f-a012-4f02-8611-0737570e8eee

    Hi,
    Thank you for sharing the solutions & experience here. It will be very beneficial for other community members who have similar questions. 
    Regards,
    Kelvin hsu
    TechNet Community Support

  • How to organize my files folder?

    how to organize my files folder without being on my desktop? I'm used to window, is there a way to create a basic folder and then subdivide it from there, but where is the best place, easy access

    You can create a folder on the desktop if you wish, and then create folders within that folder, and folders within those folders ad infinitum.  However, if you open Finder (it's the leftmost icon on your dock and looks like a blue/white face) then you will see the Documents folder.  That is the logical place to store your files generally.  The same comment I made earlier about nesting folders within folders applies here too.

  • Want to upgrade 5G ipod, how do I Save file,folder to DVD-R Thanx&PleasHel?

    Want to upgrade 5G ipod, how do I Save file,folder to DVD-R?

    how do I Save file,folder to DVD-R
    Read the info that came with your computer or DVD burner and backup software.

  • PS11 Organizer. how 2 move 1 file(folder) into another? drag & drop doesnt work...

    as it does in Win. also how can i create a new file/folder to put other files/folders into. ex a new folder names "Flowers" then put all the other files that contain flowers such as folder "red roses" into the "main" file of Flowers. Cant figure it out even using the book The Missing Manual. Thanks sara

    It sounds like this question is for Photoshop. This is a Flash forum. In any case, is your question about real folders on your computer, or server, or are asking about the files and folders in the "Layers" panel? Or, is your question about using the Library panel in Flash?

  • How can you get File/Folder information?

    Hello,
    I'm a Windows XP/Vista convert. One thing I liked about XP and Vista is how you could simply point to a file, hover the pointer over it and it would tell you information about it. Also, in the status bar it would tell you the total amount of space occupied by all the files in a folder.
    Is there a way to get this same functionality in OSX? I haven't upgraded to Leopard just yet, but I wonder if it has this functionality built into it. Very simple features, but can 10.4.10 or 10.5 do either one? Or is there a simple utility that will give this functionality to the Finder?
    Also, what's the BEST file manager for OSX out there? I use PowerDesk in XP quite a bit, is there something similar out there for the Mac?
    Thanks,
    Jeff

    Thanks, but I meant to add, is there some way to get this information other than the way you've outlined? I like how Windows handles it, either by displaying it in the status bar or showing a bubble/popup by just hovering the mouse over the icon. Please tell me that Leopard will do this. I mean, that seems like a VERY basic feature that, well, just makes sense to me. It shouldn't be anymore difficult than that.
    Is this addressed in another way in MacOSX?
    Thanks,
    Jeff

  • Office 2013 add-in - How to add custom button in existing tab/group at home and the same at individual message level?

    Hello Everyone,
    Currently, I'm developing an outlook add-in and would like to setup a custom ribbon button at one of the existing tabs at home screen and at message level too, when
    it is opened from home screen.
    Following are the helpful screen prints.
    Any help would be much appreciated.
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com

    Hello Ankit,
    All you need is to specify the IdMso value of the built-tab where you want to place your controls. See
    How to: Customize a Built-in Tab for more information (TabMail and TabReadMessage).
    You can find the list of built-in controls in the following documents:
    Office 2010 Help Files: Office Fluent User Interface Control Identifiers
    Office 2013 Help Files: Office Fluent User Interface Control Identifiers
    The Fluent UI is described in depth in the following series of articles in MSDN:
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

  • How to create a file folder in iCloud pages? (a few documents)

    Hey everyone! I want to create some file folders in my Pages on iCloud because there is no clear overview with 20 documents and/or more..but unfortunately it does not work. thanks for your support! best regards, lisa

    I had this question too.  Apple supports folders in a nice way, but it is not advertised or documented, as far as I can tell.
    I figured out how to create folders that I can see on my iPad or my iPhone--through the back door by going into the Library/Mobile Documents folder on my iMac, before I learnedf an easier way to do it on my mobile devices.
    Using your mobile device, if you open up Pages, Numbers, or Keynote on your iPhone or iPad, you have the option to see your Documents.  If you have documents that fall into a category that you would like to put in a common folder, e.g. "Colorado Trip," all you need to do to start the process is select one of the documents by pressing down on it with your finger, then dragging that document on top of one of the other documents that you want in the same folder.  A folder will be created and you will be given a chance to name that folder.  After this step, you can drag other documents into the new folder, or out of it if you change your mind.
    If you have the most recent Pages, Numbers, and Keynote iOS app updates, you can search your directory on your iPhone of iPad.  The search looks inside these new folders, so it's a fairly nice boost to your organization and productivity. 
    Enjoy!

  • How to create a file folder

    hi,
    The following codes throw an exception. The problem is that I can not create a folder "mytemp" under drive C. (Windows 2000)
    However, I have already given full permission to jre in the policy file.
    Can someone please tell me why? Thanks a lot.
    File outputFile = new File("c:\\mytemp\\my.txt");
    FileWriter out = new FileWriter(outputFile);
    out.write("555");
    out.close();

    Try
    this instead...
    regards,
    Owen
    File outputDir = new File ( "c:\\mytemp" );
    if ( !outputDir.exists() )
           outputDir.mkdir();
    File outputFile = new File("c:\\mytemp\\my.txt");
    FileWriter out = new FileWriter(outputFile);
    out.write("555");
    out.close();

  • How to upload multiple files/folder from Mac Lion?

    I am trying to upload my Indesign folder (containing indesign, fonts, links, etc.) to my printer's site, but the upload won't take the links and fonts. I have a large Imac Lion/desktop.  They say to use the "hot keys" but can't find out what those are.  The shift key, not the command key will do it either. Thanks.

    Thanks.  I tried that as well--it wouldn't take the zip either.  Went ahead and burned a cd and delivered by hand.
    PS:  Not sure why the question has "Imac indigo" at the end there--I have a new Imac Intel large screen/4 GB and I love it.

  • Guys give me a hint in how can i copy file/folder from mac to usb ?

    I´m trying to transfer some files from my mcbook Pro retina display to external disc(usb) and i´m not able to. Anybody can help me in this case?

    kytavares wrote:
    I´m trying to transfer some files from my mcbook Pro retina display to external disc(usb) and i´m not able to. Anybody can help me in this case?
    Is "transfer" nondestructive (copy) or destructive (move/delete) from your rMBP to the external USB.
    Are you using the Finder, or Terminal commands for this process?
    Is the external USB device formatted as either FAT or HFS+?
    If you receive error messages, can you share them here?

  • How to add EXPAND in url

    Hi All,
    I need your help:
    I have a url as below to execute a query with a material filter, but somehow the web report does not expanded fully.  So I want to add EXPAND cmd in this url string to forece it expand fully, but I don't know where to add and how to add Can soneone helps me?
    http://pw1host.global.bdx.com:8164/sap/bw/bex?sap-language=20&CMD=LDOC&infocube=ZMDOOI019&query=ZM00_MM_DETAILS_FOSMOSIS&FILTER_IOBJNM_1=ZMDOOI019___F00001&FILTER_VALUE_1=000000000047130510&ZMDOOI019___F00001

    Thanks in advance.
    Jin Freda

  • Renaming a file / folder

    hi all,
    how to rename a file/folder automatically when executing java program application.. and also that renamed file should not be editable like delete,open,copy,rename manually in the specified location where the folder is.
    i have used renameTo method but the folder is still editable.
    plz suggest this,

    You need to set the permissions on the file.
    In pure java you can set the read and write permissions using File but for OS specific permission you need to run the approriate command line program to set your permissions.

  • Deleting the C:\System Recovery Files folder

    In 2012 someone already posted this and I have the same problem.  Can't anyone solve this?  How about someone from HP or Microsoft.   Problem deleting the C:\System Recovery Files folder ‎01-08-2012 10:37 AM My computer, a HP-Pavillion desktop, model RK575AA-ABA a1740n running Windows Vista Home Premium, was getting more and more sluggish. One morning, when booting, I pressed F11 and clicked on "Backup and Recovery". The process took a while and resulted in a MINWINPC folder on my backup drive containing my C: drive in compressed form. The rest of the process was to take the computer back to its previous capabilities: formatting, installating the factory image of the system and installating my programs. Once this was completed, I decompressed the MINWINPC and it deposited all of the files from my previous C: drive into a "System Recovery Files" folder on my C: drive. From that folder, I copied and pasted the users data.
    The C:\System Recovery Files folder is still on my C: drive, it has served its purpose and is not needed any longer. I tried to delete it. I took administrator priviledges and right-clicked the folder and selected the "Delete" command. Surprise! Access was denied and I cancelled the command. I tried a lot of tricks gathered by a search on the Web (take ownership from the virtual menu properties and Security panel, use TakeOwnership and Unlocker) to no avail though I had very little problem deleting users data and all the files resulting from the installation of applications. Deleting the AppData folder required more patience but there was no way to delete sub-folders of Program Files containing  Window programs (Internet Explorer, Microsoft Security Client, Windows Calendar, ...). An attempt to use Unlocker even resulted in a BSOD indicating a last ditch effort by Windows to save its integrity.
    What can I do?

    Unless this folder is excessive in size, why be worried?   If you absolutely have to remove the folder, you could do it outside of Windows, since windows will not let it be done.  My choice is to get a Linux Live, make the CD to load it and then reboot to the Linux by booting to the Linux Live CD.  It will not alter the Windows install but will allow the user to remove or write whatever they want to the hard drive.  I have done this many times.  To use a user friendly  Distro look for Linux Mint or Ubuntu.Be cautioned that bad things can happen to any other files if any are accidentally altered or deleted will using this method.  The risk however is yours, depending on how much this Recovery file folder is annoying to you.

Maybe you are looking for

  • Upgrade on Satellite A205-s4607

    Hi I have a toshiba A205 - s4607, ith 2GB RAM (DDR2 PC2-5300, DDR2 (non-ECC) ) and one 200.0 GB - Serial ATA-150 - 4200.0 rpm. The laptop is absolutely original in terms of hardware, i just changed the original Vista Home for Win7 Ultimate 64bits. I

  • Itunes 11, can't find shared library

    Have to say.... so far I'm not very happy with itunes 11. A lot of what used to be intuitive is now cryptic. I guess along that line... I have a sizable library of music & vids on my main system that used to be easily accessible from my macbook's itu

  • ESATA Wiebetech external HD on ExpressCard34 not recognized

    I have a 1st gen MBP running Leopard 10.5.1. With OS 10.4, my Wiebetech eSATA HD was working thru the ExpCard34 slot. I did a clean install of OS 10.5.1, and the drive is no longer recognized. If I connect the Wiebetech HD with USB, it does get recog

  • Knowledge Management Recommended Storage Approach (DB vs Network)?

    We are starting a knowledge management initiative within sap portal and cannot find documentation that represents best practices on the actual storage approach. Our pilot project started with storing the documents within the database and it was painf

  • Java running slowly in particular user profiles.

    Hi All, I have this continuing problem in that my java version(latest) runs slowly under my user profile. If i log into my computer using someone elses profile it is very fast. Could this be some sort of setting in my user profile, a java problem or