Showing tag results for Thomas Rayner

Feb 18, 2016
Post comments count0
Post likes count0

PowerTip: Count backwards in array

Doctor Scripto

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how to count backwards in a Windows PowerShell array.  I know I can access the first, second, and third items in an array by using $Array[0], $Array[1], and $Array[2], but how can I count backwards?  Use negative numbers, for example: $Array = @('first','second','third') $Array[0...

Scripting Guy!Windows PowerShellPowerTip
Feb 18, 2016
Post comments count0
Post likes count0

Migrate Windows CA from CSP to KSP and from SHA-1 to SHA-256: Part 4

Doctor Scripto

Summary: Thomas Rayner, Microsoft Cloud & Datacenter Management MVP, shows how to import a certificate into a KSP and bring it into the certificate store. Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy this week. You can find me on Twitter (@MrThomasRayner) or on my blog, Wor...

Scripting Guy!Windows PowerShellguest blogger
Feb 17, 2016
Post comments count0
Post likes count0

PowerTip: Prompt user for value but provide default

Doctor Scripto

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how to set a variable to a default value in PowerShell.  How can I use Windows PowerShell to prompt a user for a value for a variable, but provide a default value if the user doesn’t enter anything?  First prompt the user for the value to the variable and then detect if the respo...

Scripting Guy!Windows PowerShellPowerTip
Feb 17, 2016
Post comments count0
Post likes count0

Migrate Windows CA from CSP to KSP and from SHA-1 to SHA-256: Part 3

Doctor Scripto

Summary: Thomas Rayner, Microsoft Cloud & Datacenter Management MVP, shows how to delete your Windows CA certificates and crypto provider as a part of migrating a Windows certification authority from CSP to KSP and from SHA-1 to SHA-256. Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scrip...

Scripting Guy!Windows PowerShellguest blogger
Feb 16, 2016
Post comments count0
Post likes count0

PowerTip: Use positional parameters

Doctor Scripto

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how to use positional parameters in Windows PowerShell.  I always see people pass variables or data to a function without specifying the parameter name that the data is for, for example: “copy-item $source $destination” acts like “copy-item –path $source –destination $destination...

Scripting Guy!Windows PowerShellPowerTip