Diskpart automation and scripting SCCM

Hello,
i am using SCCM 2012 for windows 7/8 deployments, there are some desktops without system reserved volumes/partition and some desktop with system reserved volume.
I want to use the diskpart script to delete only Windows volume instead of other volume. the script i have created is working fine for some desktop (with system reserved volume). if the system don't have SYSTEM Reserved volume it will delete the D drive
also, so i need help on this automation
select disk 0
select partition 1
delete partition override
create partition primary size=100
select partition 1
format quick fs=ntfs override label="System Reserved" noerr
assign letter=S
active
select disk 0
select partition 2
delete partition override
create partition primary
select partition 2
format quick fs=ntfs override label="Windows" noerr
assign letter=C
exit
thanks

Hello Peter,
In my environment the desktop are not standardized, each desktop have different configuration for disk, memory, etc.
we want to format c: drive to reinstall OS and applications.
Windows 7 with System-Reserved volume + C:\ (OS) + D:\ (Data volume)
Windows 7 with C:\ (OS) + D:\ (Data volume)
Windows XP with C:\ and D:\ (Data volume)
so for option 2 and 3 each time i have to change the script for to delete partition 1 instead of partition 2.
so can we have some powershell script : if the system-reserved volume is not found then delete volume 1
if the system-reserved volume found delete volume 2
thanks,

Similar Messages

  • I have an iMac and a NAS installed, I've made an automator based script to mount the NAS volumes, will i have to rewrite when moving to Lion?

    I have an iMac and a NAS installed, I've made an automator based script to mount the NAS volumes, will i have to rewrite when moving to Lion?

    Hi Tony,
    Long shot, but...
    Open Audio Midi Setup in Applications>Utilities, see the input & output options & KHz setting there, some things will change it for their own use, then not set it back.

  • Illy CS3 Automating a Script

    This probably sounds redundant
    over and over again , automating a script, but is there a way of assign
    ing a keyboard shortcut
    or run the
    script in an action?  I use mucho a script written and generously shared by JET to joinnearest points.  It's a pain to have to click on file and then scripts and then select the script each time.   I would like to eliminate 2 clicks (or mashes as they say in the southern states).  Is there a way to do this within the script (adding a lline)?
    Guidance will be appreciated.

    This Action-Script bug has been present for several versions, at least
    Correct. I have been complaining about this bug for four versions now.
    It has become my practice to do this:
    I keep an Action defined in my Actions palette named JET_CurrentScript. When it becomes clear to me that I will be repeatedly using a script in a work session, I go ahead and use InsertMenuItem to insert the step in that Action.
    This is not a fix or even a workaround. It just lessens the tedium in certain circumstances. It becomes just as tedious, of course, if you have to do that for multiple frequently-needed scripts with every launch (you know--like having to reset your palette settings in Swatches, Doc Info, etc.)
    Illustrator's script access interface--like too much in Illustrator--is half-baked. Sloppy. Rushed-to-market. Compare to InDesign's Scripts palette.
    Now that ScriptUI provides for creation of floating dialogs (and supposedly modeless palettes--something else that's quite problematic with Illustrator's scripting implementation), one can combine several scripts into one dialog to handle multiple user inputs. I may get around to doing that with closely-related groups of my scripts, but am currently just getting acquainted with the rather tedious ScriptUI model.
    There are ways to make a script run when the program is launched. So it may be conceivable to devise a startup script that would launch a script containing such a multi-purpose palette. But I haven't monkeyed around with that yet, because it would be dependent upon the afore-mentioned modeless dialog working correctly--you wouldn't want a modal dialog to appear whenever you launch the program.
    I'm certainly no advanced Javascripter; I'm a self-motivated, self-trained "student" and "experimenter" when the mood strikes.
    I'm gratified, by the way, that some of you seem to fiind my Join scripts handy. I consider the functionality indespensible in my own work, which is why I hacked them out. But it is absolutely absurd that one has to resort to custom scripting to do something that should so obvously be a standard function in the program.
    JET

  • Issue with Automator and Circus Ponies Notebooks

    I have not found an Automator specific discussion, so let me know if there is somewhere else I should post this.
    I have created a limited backup program with Automator. It begins with "Get Specified Finder Items". The second step is "Copy Finder Items". I kept getting messages that it could not backup various Notebooks because it couldn't copy certain Notebook files. The issues were always with something in a Notebook .../Attachments/ that ended with the extension .moddates.
    Using PathFinder 5, I would right click and select Show Package Contents. I found numerous "contents.old.plist" files in these Notebooks which I deleted. I would try again and it would be another issue, but always with a Notebook file. In some other cases I found things in the attachments folder which I deleted, one of which was a .jpg of a screenshot of a a 'page' in Things. Two others were .eml files.
    I thought these actions would correct the issue, but now it seems that there is no end to this issue. Using PathFinder 5, show invisibles, and show package contents I see a .moddates file, but do not want to delete it.
    My next attempt at resolving this was to used PathFinder to just copy the Notebook directory directly to my Flash Drive which is formatted as Mac OS Extended (Journaled) or HFS+. There was no problem copying the files this way, so I am wondering if the problem could be with Automator.

    The way that you are getting the value of the variables will only work in an Automator workflow, since that terminology is from Automator's scripting dictionary. If the workflow is saved as an application or is otherwise run outside of the Automator environment (i.e. no workflow window), another method will need to be used to retrieve the variables, such as preceding *Get Value of Variable* actions, a temporary file, or user defaults.
    If you aren't using any other input items, for example, you can use something like:
    1) *Get Value of Variable* { Variable: ProjectName } (Ignore Input)
    2) *Get Value of Variable* { Variable: ProjectManager }
    3) *Get Value of Variable* { Variable: RegionManager }
    4) *Get Value of Variable* { Variable: Partner }
    5) *Get Value of Variable* { Variable: TodayDate }
    6) *Run AppleScript*:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    set ProjectName to (first item of the input) as text
    set ProjectManager to second item of the input
    set RegionManager to third item of the input
    set Partner to fourth item of the input
    set TodayDate to (fifth item of the input) as text
    -- rest of script
    end run
    </pre>

  • Automator and sound preferences

    Imac Mac OS X (10.4.9)
    Is there any way set up an automator script (or Apple script) to change sound preferences. Example, change from Imic output to headphone output, turn off and on Isub. Any help would be appreciated.

    Furthermore, I came across this applescript in forums which appears to do switching, it opens the preference panel and selects sound but then stops with the fault.
    System Events got an error: NSReceiverEvaluationScriptError: 4
    I don't understand the script language yet as I am new to automator and apple script.
    i need to switch between imic output(with sub off) and headphone output (with sub on)
    Also whats the best place to learn apple script language?
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.sound"
    end tell
    tell application "System Events"
    tell process "System Preferences"
    click radio button "Output" of tab group 1 of window "Sound"
    repeat until (value of radio button "Output" of tab group 1 of window "Sound") is 1
    end repeat
    if (selected of row 1 of table 1 of scroll area 1 of tab group 1 of window "Sound") is true then
    select row 2 of table 1 of scroll area 1 of tab group 1 of window "Sound"
    repeat until (selected of row 2 of table 1 of scroll area 1 of tab group 1 of window "Sound") is true
    end repeat
    else
    select row 1 of table 1 of scroll area 1 of tab group 1 of window "Sound"
    repeat until (selected of row 1 of table 1 of scroll area 1 of tab group 1 of window "Sound") is true
    end repeat
    end if
    end tell
    quit
    end tell
    Imac Mac OS X (10.4.9)
    Imac Mac OS X (10.4.9)
    Imac Mac OS X (10.4.9)

  • Automated Unix Script For Registering Artifacts In OER

    Hi,
    i want to create automated unix script which will register the artifacts automatically in Oracle Enterprise Repository (OER)
    is it possible to automatically harvest the artifacts in OER.
    please help
    regards,
    yshintre

    Some of what you want is possible. Take a look at the Count Tool in CS3/4. It may only be available in the Extended versions. That provides a
    reasonable interface for marking items in a image like you are wanting to do with cells. Take a look at that and see what kind of manual process
    you can get worked out.
    However, to get the workflow you want (or anything close to it) would require more than a little code.

  • Automator Shell Script

    Hi,
    I am very new to Automator and know the very basics about Unix but use Terminal frequently for very repetitive tasks (which I usually find on the web) - one of which is creating MD5 of all files within a specific folder. To achieve this I generally open Terminal, go to a specific project folder and enter: find . -print0 | xargs -0 -I{} md5 "$@"{} >> md5.chk
    This then creates a txt file called md5.chk within the folder which lists all off the files within that folder (with file path) as well as all the the associated checksums for these files.
    I would like to streamline this process a little by creating a service with Automator so I can select a Folder within Finder and select the require Service.
    Unfortunately I am not getting very far. This is where I am:
    1. Open Automator and select Service
    2. Add "Get Specified Finder Items" action
    3. Add "Run Shell Script" action (Pass input: as argument) with the following: find . -print0 | xargs -0 -I{} md5 "$@"{} >> md5.chk
    Unfortunately this doesn't achieve the required result. I presume there are some elements within the shell script that I am simply missing. Can anyone help?
    Thanks

    This is a test. It is ONLY a test.
    Change your Automator "Run Shell Script" to:
    ( pwd
    echo "+++++"
    /bin/ls -dlae0@ .
    echo "+++++"
    id -a
    echo "+++++"
    echo "number of args: $#"
    echo "+++++"
    printenv
    echo "+++++"
    echo find "$@" -type f -print0
    echo "+++++"
    find "$@" -type f -print0 | xargs -0 -I{} echo "{}"
    ) >/tmp/tmp.txt
    Then look at /tmp/tmp.txt and see if the expanded command look they it should. You can get to the /tmp directory using Finder -> Go -> Go to Folder -> /tmp
    The double-quotes will be missing (as the shell will swallow them), however, what you are interested in is did the "$@" expand to the desired directory.
    The pwd will tell us what the current working directory is. This could be important, as maybe you do not have permissions to use that directory.
    The /bin/ls will tell us the ownership and permissions of the current working directory.
    The id -a will tell us what account the automator script is running as
    The $# will tell us how many arguments were passed as part of the "$@"
    The printenv will tell us what environment variables have been set.
    The find|xargs is changed to replace md5 with echo, so that we can see that the "{}" expanded to.

  • Automator shell script to zip

    I'm trying to follow some advice I found to use an automator Finder Plugin to zip selected files and save the zipped files. It's not working. Here's what I'm doing:
    1) Open Automator
    2) Under Libarary, select Automator.
    3) Drag Run Shell Script to Workflow window.
    4) Leave Shell = bin/bash, make Pass input = as arguments.
    5) Enter code:
    for f in "$@"
    do
    zip -r "$f" "$f"
    done
    6) Save As Pluging. Name = ZipClean, Plug-in for = Finder.
    7) Try it out... no joy. Select one file and right click to Automator -> ZipClean. It seems to go away for a bit of time and come back, but no new zip has been created (really, I searched!).
    I know this is a silly script but if I can get this version to work, I'm going to add -x *.DS_Store -x .svn in order to create zips that are not corrupted by osx and svn invisible files and directories.
    So bottom line... why isn't the zip file being created and stored? When I do this directly in a terminal window it seems to work ok.
    Thanks in advance!
    joe

    If you plug your shell script into Automator and use a Finder action to pass items to it, it works for a folder but fails for a single file. You might need to tweak the parameters for a plug-in - refer to the zip manual page. You can also use ditto (I posted an AppleScript action earlier using ditto in this reply).

  • Automator shell script won't run

    Hi,
    I'm putting together a little Automator app that opens whenever I double-click on an .exe file and opens that file with wine. So far, however, I've had little luck. I've created a shell script automator app with the following script:
    for f in "$@"
    do
              /usr/local/bin/wine "$f" &
    done
    Outside of Automator the script works just fine. However, as an Automator app it doesn't work at all; nothing happens, even though Automator tells me that that the workflow was successfully completely. What am I doing wrong?
    Thanks,
    Alex

    Automator uses /bin/bash as the shell.
    Running your script interactive has a different environment from running under Automator.  For one thing, stdin/stdout/stderr are pointing to a tty (actually a pseudo device /dev/pty).  Perhaps this is affecting how Wine us behaving.
    Other issues might be where your current working directory is located, or some environment variable (such as PATH) that is not the same under Automator that exists when running interactively.
    You might try capturing things like
    ( printenv
      pwd
      id -a
      echo "\$# $#"
    ) >/tmp/automator.environment

  • How to set up the interaction between InDesign CS6 8.0 and Photoshop CS 6 - if Photoshop is installed and the 64 and 32-bit?? default InDesign refers to the 64-bit version of Photoshop and scripts do not work.

    how to set up the interaction between InDesign CS6 8.0 and Photoshop CS 6 - if Photoshop is installed and the 64 and 32-bit?? default InDesign refers to the 64-bit version of Photoshop and scripts do not work.

    Nice of you to point it out here as I at least don’t follow Mr.Nash’s blog regularly.

  • Mappings and script functoid

    Can you have both mappings (direct mapping in the graph) and scripting functoid in the same map?
    Anonymous

    Hi,
    Yes, direct mapping and scripting functoid can be used in the same map.
    In case of complex map and lot of direct mapping it is advisable to make use of more than 1 pages, just for better readability.
    Pages are a great way of dividing your map into smaller, more manageable blocks. The functionality of the map is in no way influenced with how many pages you have and what functionality goes into what pages.
    You can learn more about Biztalk Maps by following the links below:
    1) http://www.informit.com/articles/article.aspx?p=1752306
    2)
    http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&cad=rja&uact=8&ved=0CEMQFjAF&url=http%3A%2F%2Fbiztalkevents.files.wordpress.com%2F2013%2F03%2Fobid-biztalk-mapping-patterns-and-best-practices.pptx&ei=L2U3VJHrApHmauiLgZgD&usg=AFQjCNHnYSa-ynxUKRRdr14LcB85brSNUw&bvm=bv.76943099,d.d2s
    3)
    http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0CDMQFjAD&url=http%3A%2F%2Fwww.slideshare.net%2FSandroPereira3%2Fbiztalk-server-basics-principles-of-maps&ei=L2U3VJHrApHmauiLgZgD&usg=AFQjCNG6iJRePcbrHr9CS2_apBuNAzYR0w&bvm=bv.76943099,d.d2s
    Hope this helps.
    Rachit
    Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem

  • XML Validation using java for SQL Injection and script validation

    I have an input coming from xml file.
    I have to read that input and validate the input against sql injections and scripts.
    I require help now how to read this xml data and validate against the above two options.
    I am a java developer.
    in this context what is marshelling?

    http://www.ibm.com/developerworks/library/x-javaxmlvalidapi.html?ca=dgr-lnxw07Java-XML-Val
    http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/package-summary.html
    The following code validates the xml against a xml schema
    // define the type of schema - we use W3C:
    String schemaLang = "http://www.w3.org/2001/XMLSchema";
    SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
    Schema schema = factory.newSchema(new StreamSource("sample.xsd"));
    Validator validator = schema.newValidator();
    // at last perform validation:
    validator.validate(new StreamSource("sample.xml"));Message was edited by:
    haishai

  • Naming conventions to store automation testing scripts

    Hi,
    Can anyone provide the solution for Naming conventions to store automation testing scripts in oracle application testing suite?
    Regards,
    Sairam

    Hi Sairam
    There are no naming conventions you can call them anything you like.
    Regards
    Alex

  • Smart and script forms..?

    hi experts
    Can anybody explain me about the SAP SMART and SCRIPT forms ..
    1.What is Script and Smart forms.?
    2.Give some examples of both script and smart forms? (RFQ,PO,Sub-sontract challan, RG23A..registers ..)
    3.what is the difference between script and smart forms,?
    Thanks
    SAP-MM

    Dear Friend,
    Both smart form and script are output tools for print out, script is the older version
    1.SCRIPTS ARE CLIENT DEPENDENT
    SMARTFORMS ARE CLIENT INDEPENDENT
    2.WE CANNOT ADD COLORS IN SCRIPTS
    WE CAN ADD COLORS IN SMARTFORMS
    3.WE CANNOT GET THE FUNCTION MODULE WHEN WE ACTIVATE THE PROGRAM
    WHEN WE ACTIVATE THE PROGRAM WE GET FUNCTION MODULE
    4.WE CAN WRITE ENTIRE CODE IN SMARTFROM ITSELF
    Regards
    Pramod

  • PO Print Program and Script

    Hi All,
    Where I can find a Print Program and Script associated with a particular PO.
    Please suggest.
    GS

    Hi,
    Go to me22n or me23n. Give the PO no . Click on Messages > See whether any output type exists or not. If exists then go to tyransaction nace . In th application select EF -Purchase Order. Click output type> In the output type search your output type Select it and then click on Processing routines you will see the program name & form name.
    You can check with the output type in TNAPR table also . By giving output type in KSCHIL field it will give u print program & Form name.
    Thanks,
    Abhijit

Maybe you are looking for

  • Dock Question

    As Apple is closed right now - does anyone know whether th universal dock online at the Apple store takes the new 3G model: The link to it is: http://store.apple.com/us/product/MB125G/A?fnode=home/shopiphone/iphone_accessories/cablesdocks&mco=NTQyNjk

  • SOAMANAGER - Alternative URLs for WSDLs and Endpoints  in ECC

    Hi All, We are publishing enterprise services using SOAMANGER transaction in ECC system. In our development environments we have no problem with the process. However in our cert and production environments we have loadbalancers, with SSL offload, and

  • HT4914 How does iTunes match work with multiple Apple IDs?

    I am trying to set up an iTunes Match account that complies the music of my whole family so that we can all acceess it from our devices. First, is it possible to upload music from multiple apple IDs and / or devices. And is it possible to then access

  • Slow Connecting to Wifi

    I recently restarted my iPod Touch and the first thing I noticed was that it takes a LONG time to connect to wifi and when it displays the signal icon, i have to wait several minutes before I can actually connect to the internet. In addition, it appe

  • How to customize video player progress bar?

    I want a video progress bar (maybe it is a slider ), which can be used to show the buffer progress of video, the standard slider control in Flex has not this function. How can I customize the silder control?