Location of Colors and Fonts XML
Hi, I’m trying to get a list of the default syntax colouring for PowerShell ISE. I’d like to try and match my text editor to the same colour scheme. I would imagine this is stored in an XML file...
View ArticleReply To: Change 'header'
Thanks for all your help Richard, I’ve just ordered both books from Amazon and am looking forward to getting started. I now seem to remember PowerShell in a Month of Lunches being mentioned in the...
View ArticleIIS question
Hi, I have a question about some of the PowerShell Commands in the WebAdministration module. When I run the command get-website I get a list of all my websites, and the first column is headed “Name”,...
View ArticleReply To: Location of Colors and Fonts XML
Open the ISE, and type $host.PrivateData.TokenColors in the console window. This is a hashtable of token type names to [System.Windows.Media.Color] objects, which you can read (and even modify, if you...
View ArticlePresentation Materials – PhillyPoSh
Just been looking to download Boes Prox’s presentation materials from the recent Philly PoSH and the link (http://powershell.org/w/wp-content/uploads/2014/05/PhillyPosh-2014_05_01-BoeProxp_WSUS.zip)...
View Articlesplitting path using powershell
Hello experts, I am new to powershell and I am writing a powershell script to copy certain files from temp location to target directories, this is where I am right now: $sourcedirectory =...
View ArticleReply To: IIS question
Hi Nick, This stumped me too when I first started messing with the IIS commandlets. Please refer to this blog post for more guidance....
View ArticleReply To: IIS question
The Name column which is displayed for the items returned by the Get-WebApplication cmdlet is not an immediate property on the returned object. The Name displayed there is defined in the...
View ArticleReply To: IIS question
By the way, you can read up more about how the default display of types are handled in PowerShell if you run the following command: Get-Help about_Format.ps1xml
View ArticleReply To: IIS question
If you have PowerShell 3 and above I believe you should be able to do something like the following, if you want to add it to all items of the type...
View ArticleReply To: PasswordLastSet subitem.add
First off I’d suggest testing that you are actually getting data back. Your syntax look right but just to be sure test Get-QADUser -searchroot “OU=x,dc=x,dc=x” -locked -IncludedProperties...
View ArticleReply To: splitting path using powershell
First off think about using Write-verbose rather than Write-Host. You probably need quotes round the message you are writing. There is no straightforward way to remove the c:\temp part of the path You...
View ArticleReply To: splitting path using powershell
You could do something like this to trim “c:\temp” from the beginning of the strings: function Remove-LeadingString { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipeline =...
View ArticlePowershell menu , multiple choice (cli)
Hi, I have using this script found at posh: http://poshcode.org/2893 I am trying to figure out how to use the multiple choice parameter, but am not advanced enough in Powershell to figure out how to...
View ArticleReply To: Multi-Threading & File based Logging
I ended up leveraging MSMQ Queue for this. The parent script spins up dumps all the jobs to be done into one queue. Spins up 20+ jobs which pull items from the queue, process them, then dump the...
View ArticleReply To: Powershell menu , multiple choice (cli)
The parameter $multiplechoice is a switch parameter, so in order to call this function with that enabled you would just add “-multiplechoice” to your command line. If the switch parameter is passed,...
View ArticleReply To: Powershell menu , multiple choice (cli)
Excellent thanks for making that clear. Would there be a way to have a checkbox (in my dreams?) to choose? Is there a simpler way for them to choose as opposed to choosing them individually? Thanks!
View ArticleReply To: PasswordLastSet subitem.add
Thats great, thanks for you help. Must have been looking at it too long! $item.SubItems.Add([string]$luser.PasswordLastSet)
View ArticleReply To: PasswordLastSet subitem.add
This is one of those things that you remember because you’ve tripped over it before. No prizes for guessing how I found out about it…
View Article