Your first argument is that starting position in the string, and the second is the length of the substring, starting at that position. The expression for the 2 characters at positions 68 and 69 would be:
$parameter = $string.Substring(68,2)
More Related Contents:
- this code my teacher gave it to us as homework and it does not work with me idk why
- How can you use an object’s property in a double-quoted string?
- In what scenario was Invoke-Expression designed to be used?
- How can I write/create a powershell script verbatim, from another powershell script?
- Powershell: passing json string to curl
- How can I replace every occurrence of a String in a file with PowerShell?
- How do I pass variables with the Invoke-Command cmdlet?
- Loop through files in a directory using PowerShell
- Difference between ForEach and ForEach-Object in powershell
- How to reference .NET assemblies using PowerShell
- Any way to double-click on .PS1 file & open them in PowerShell?
- Set-Content appends a newline (line break, CRLF) at the end of my file
- Get current user’s credentials object in Powershell without prompting
- Redirect Write-Host statements to a file
- Progress during large file copy (Copy-Item & Write-Progress?)
- How to get started with PowerShell? [closed]
- Powershell ConvertTo-json with embedded hashtable
- How to convert to UInt64 from a string in Powershell? String-to-number conversion
- Unable to convert a string to an integer variable from DateTaken attribute on a JPG file
- How to Grant permission to user on Certificate private key using powershell?
- Using Invoke-Command -ScriptBlock on a function with arguments
- Is there a way to pass serializable objects to a PowerShell script with start-process?
- How to use PowerShell copy-item and keep structure
- CMD or Powershell command to combine (merge) corresponding lines from two files [duplicate]
- How to download the SSL certificate from a website using PowerShell?
- Rename file on FTP with PowerShell
- In Powershell what is the idiomatic way of converting a string to an int?
- PowerShell is missing the terminator: “
- Using PowerShell to remove lines from a text file if it contains a string
- How to execute a PowerShell script only before a web deploy Publish task in VS 2012?