Jump to content




Search the Community

Showing results for tags 'one-liner'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Stuff
    • Site News
    • Windows News
    • Suggestion box
    • General Chat
    • Events
    • Jobs
  • Cloud
    • Microsoft Intune
    • Azure
    • Office 365
  • Microsoft Deployment Toolkit
    • Deploying Windows 10, Windows 8.1, Windows 7 and more...
  • SMS, SCCM, SCCM Current Branch, SCCM Technical Preview
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • How do I ?
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Server
    • Active Directory
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Windows Server 2008
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Operations Manager
    • 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
  • Microsoft SQL Server
    • SQL Server
  • Windows General
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • how do I do this ?
    • windows screenshots

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"
×