Showing results for 2021 - PowerShell Community

Dec 13, 2021
0
2

How to Preview PowerShell Scripts In PowerShell

@DoctorDNS
@DoctorDNS

Q: When I use Windows Explorer and select a PowerShell script file - I do not see the script in the preview window. Can I fix that? A: You can make a few simple registry updates and do just what you want! At some time in the deep and distant past, Windows Explorer gained the preview pane feature. The idea is simple: you select a file in Explorer ...

ExplorerExplorer Preview
Dec 7, 2021
2
2

How to Use $PSDefaultParameterValues

@DoctorDNS
@DoctorDNS

Q: When I use cmdlets like and , how do I change default values of the Keep and Wrap parameters? A: Use the automatic variable. When I first discovered PowerShell's background jobs feature, I would use to view job output - only to discover it's no longer there. And almost too often to count, I pipe objects to cmdlet only to get truncated outp...

Default Parameter valuesparameters
Nov 5, 2021
0
2

How to Use $FormatEnumerationLimit

@DoctorDNS
@DoctorDNS

Q: When I format an object where a property contains more than 4 objects, I never see the extra property values. How can I fix that? A: Use the variable. This query is one I hear in many PowerShell support forums, and I have encountered this issue a lot over the years. What happens is that you issue a command to return objects, for example . The...

FormatFormatEnumerationLimit variable
Oct 25, 2021
3
0

How to use the Secret modules

@DoctorDNS
@DoctorDNS

Q: I have a bunch of scripts we use in production that make use of Windows credentials. In some cases, these scripts have an actual password in plain text, while others read the password from an XML file. Is there a better way? A: Scripts with high-privilege account passwords in plain text is not a good idea. There are several methods you can use ...

SecretManagementpasswordscredentials
Oct 14, 2021
0
1

A closer look at the Crescendo configuration

Sean Wheeler
Sean Wheeler

In my previous post, I looked at the details of a Crescendo output handler from my VssAdmin module. In this post, I explain the details of a cmdlet definition in the Crescendo JSON configuration file. The purpose of the configuration The structure for the interface of a cmdlet is a reasonably predictable thing. The pattern of the script co...

Crescendojsonconfiguration
Oct 11, 2021
0
1

A closer look at the parsing code of a Crescendo output handler

Sean Wheeler
Sean Wheeler

In my previous post, I showed you how to parse the output from the command. The output of is not very complex. The goal of the post was to introduce some parsing strategies that you can use to create a full Crescendo module. In this post, I explain the details of a more complex parsing function that I created for my VssAdmin module. Examining th...

Crescendooutput handlerparsing
Oct 4, 2021
5
2

Converting string output to objects

Sean Wheeler
Sean Wheeler

In my previous post, I talked about using Crescendo to create a PowerShell module for the command in Windows. As I explained, you have to write Output Handler code that parses the output of the command you are using. But if you never written a parser like this, where do you start? In this post I show you how to parse the output from the command....

Crescendoparsing stringsnetstat
Sep 30, 2021
6
1

Understanding Get-ACL and AD Drive Output

Faris Malaeb
Faris Malaeb

Understanding Active Directory ACL using PowerShell can be a bit tricky. There are no out-of-the-box cmdlets with ActiveDirectory PowerShell module to help in settings the permission quickly. While there are no cmdlets, you can nevertheless manage AD permissions using the AD PowerShell drive. In this post, I will try to simplify Active Directory A...

PowerShellActive DirectoryACL
Sep 27, 2021
8
3

My Crescendo journey

Sean Wheeler
Sean Wheeler

In a recent PowerShell Users Group meeting I was thinking that it might be good to talk about the new Crescendo module and how to use it. I was going to ask Jason Helmick if he would do a presentation for us. Then, in an unrelated conversation, someone mentioned using for some project. This got me thinking: is a perfect candidate for a Crescendo ...

CrescendoModulevssadmin
Sep 21, 2021
2
1

How to Make Use Of PowerShell Profile Files

@DoctorDNS
@DoctorDNS

Q: I would like to personalize the way that PowerShell works. I have heard that I can use a thing called a profile to do this, but when I try to find information about profiles, I come up blank. There is no cmdlet, so I do not see how to create such a thing. Can you help me, please? A: Profiles are a powerful part of PowerShell and allow you to c...

PowerShellprofile