Showing results for September 2015 - Page 9 of 12 - Scripting Blog [archived]

Sep 10, 2015
0
0

PowerTip: Use PowerShell to Create New GUID

Doctor Scripto
Doctor Scripto

Summary: Use Windows PowerShell to create a new GUID.  How can I use Windows PowerShell to easily generate a new GUID for a project.?  Use the New-Guid cmdlet.   If you need to create more than one, you can use code such as the following (% is an alias for Foreach-Object): 1..4 | % {new-guid}

Scripting Guy!Windows PowerShellPowerTip
Sep 10, 2015
0
0

Use Inheritance in PowerShell 5 Classes

Doctor Scripto
Doctor Scripto

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using inheritance with Windows PowerShell 5.0 classes in Windows 10. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk about class inheritance with Windows PowerShell 5.0 in Windows 10. In Introduction to PowerShell 5 Classes, I talked about class design and I mentioned how im...

Scripting Guy!Windows PowerShellPowershell 5
Sep 9, 2015
0
0

PowerTip: Find Class Constructors in PowerShell 5

Doctor Scripto
Doctor Scripto

Summary: Learn how to easily find class constructors.  How can I use Windows PowerShell 5.0 to find the constructor overloads for a new class I want to create?  Place the class in square brackets, and call the static New method with no parentheses, for example: [datetime]::new

Scripting Guy!Windows PowerShellPowerTip
Sep 9, 2015
0
0

PowerShell 5 Classes: Constructor Overloading

Doctor Scripto
Doctor Scripto

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using the new Windows PowerShell 5.0 class feature in Windows 10 and doing constructor overloading. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk about overloaded constructors. I know, I know, I know… It sounds like some sort of engineering failure. But that is not the c...

Scripting Guy!Windows PowerShellscripting techniques
Sep 8, 2015
0
0

PowerTip: Quickly Fix a Volume with PowerShell

Doctor Scripto
Doctor Scripto

Summary: Use Windows PowerShell to perform a quick fix on a volume.  How can I use Windows PowerShell to perform a quick fix on a volume that is somewhat suspect?  Use the Repair-Volume cmdlet and specify the drive letter and the SpotFix parameter, for example: Repair-Volume -DriveLetter E -SpotFix

Scripting Guy!Windows PowerShellPowerTip