Format RemoteDrive - PPOSHGROUP/PPoShTools GitHub Wiki

Format-RemoteDrive

PPoShTools -> Format-RemoteDrive.ps1

Synopsis

Formats all RAW drives on a remote system.

Syntax

Format-RemoteDrive [-ComputerName] <String> [[-NewFileSystemLabel] <String>] 
[[-FileSystem] <String>] [[-Credential] <Object>] [<CommonParameters>]

Description

Using Invoke-Command will connect to remote system (ComputerName) and will format all RAW drives with given properties

Parameters

-ComputerName<String>

Name of a remote system to connect to using Invoke-Command.

  • PipelineInput: true (ByValue, ByPropertyName)
  • Required: true

-NewFileSystemLabel<String>

Drive label (i.e. "MyData") for all drives to be formatted.

  • PipelineInput: true (ByValue, ByPropertyName)
  • Required: false

-FileSystem<String>

FileSystem to be choosen for drives (ReFS and NTFS available)

  • Valid values: NTFS, ReFS
  • PipelineInput: true (ByValue, ByPropertyName)
  • Required: false

-Credential<Object>

Alternate credentials to use to connect to ComputerName

  • PipelineInput: true (ByValue, ByPropertyName)
  • Required: false

Examples

Example 1

Format-RemoteDrive -ComputerName SomeServer -NewFileSystemLabel DATA -FileSystem ReFS -Credential (Get-Credential)

Will connect to SomeServer using given credentials and will format all RAW drives to ReFS with DATA label

⚠️ **GitHub.com Fallback** ⚠️