Jump to content


Search the Community

Showing results for tags 'cmd.exe'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Cloud
    • Azure
    • Microsoft Intune
    • Office 365
    • Windows 365
  • General Stuff
    • General Chat
    • Events
    • Site News
    • Official Forum Supporters
    • Windows News
    • Suggestion box
    • Jobs
  • MDT, SMS, SCCM, Current Branch &Technical Preview
    • How do I ?
    • Microsoft Deployment Toolkit (MDT)
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Client
    • how do I ?
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • windows screenshots
  • Windows Server
    • Windows Server General
    • Active Directory
    • Microsoft SQL Server
    • System Center Operations Manager
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Data Protection Manager
    • System Center Service Manager
    • System Center App Controller
    • System Center Virtual Machine Manager
    • System Center Orchestrator
    • Lync
    • Application Virtualization
    • Sharepoint
    • WSUS

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests

Found 1 result

  1. OSD Run Command Line: One Liners Please find attached a set of usefull SCCM OSD Task Sequence "Run Command Line" One-Liners Show Task Sequence Name in SCCM Status Messages: cmd.exe /C "echo %_SMSTSPackageName%" Format Disk 0 for Staging (Remove Bitlocker before downloading first Package) cmd.exe /c "(echo select disk 0&& echo.clean&& echo.list disk&& echo.list volume) > .\diskpart.txt && diskpart.exe /s .\diskpart.txt" Adjust OSDDiskIndex (Max two disks) (Useful if a device has two disk and either one can/should be the C drive. Work in combination with the step "Format and Partition Disk" and overwrites the "Disk Number" value) cmd.exe /V /C "(set /a osdID=1-%OSDDiskIndex% > null&& tsenv.exe "OSDDiskIndex=!osdID!")" Set Drive Offline/Online by variable (see: Bitlocker Pre-Provision multi Disk) cmd.exe /c "(echo select disk %OSDDiskIndex%&& echo.offline disk&& echo.list disk) > .\diskpart.txt && diskpart.exe /s .\diskpart.txt" cmd.exe /c "(echo select disk %OSDDiskIndex%&& echo.online disk&& echo.list disk) > .\diskpart.txt && diskpart.exe /s .\diskpart.txt" Fix Drive Letter of mounted devices (Best used in combination with conditions) cmd.exe /V /C "FOR /F %V IN ('mountvol.exe D: /L') DO (mountvol.exe D: /D & mountvol.exe F: %V)" (Checks if devices has one disk and device with drive letter D is an USB Drive --> Map USB from D to F Drive Letter) (Checks if devices has one disk and device with drive letter D is an CDRomDrive --> Map CDRom from D to E Drive Letter) Forcefully halt the task sequence (The file does not exist and therefor generates an error, best/only to use with conditions) Enables Task Sequence Powershell special return codes StopTaskSequenceWithError.exe The step before is a "Run PowerShell Script" step and may return "SomeRandomPs1ReturnCode". But the step does not support defining return codes. To overcome this issue change the powershell script or set "Continue on Error" and create this step afterwards. If you like this collection and have some other useful commands by your own please share them in a "reply to this Topic"
×
×
  • 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.