Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Reply To: Linking values from imported CSV

I have to agree. My threshold for using someone else’s code is way too high, I think, though; I probably need to work on changing that. For people like you and me, who are probably capable of writing...

View Article


Comparing two values

I’m trying to compare two values. If they match, I need to say they match. If they do not match, I need to say they do not match. Simple enough, however, I have one character that is throwing this all...

View Article


Reply To: Comparing two values

Are both of these values actually strings? When PowerShell displays objects as text, those curly braces sometimes indicate a property that is a collection. Assuming they’re both strings, in this...

View Article

Reply To: Comparing two values

Thanks Dave. If I could buy you a beer, I would. Here is a virtual one! I had to modify my query a little, but it’s working great.

View Article

Set applicationPoolDefaults properties

Hello! I need help setting the properties of applicationPoolDefaults itself. I cannot find this object under IIS:\AppPools and I would like to see if can use command Set-ItemProperty like in the...

View Article


Image may be NSFW.
Clik here to view.

Quick question regarding Terminal Services Home Folders

I need to move a buttload of home directories which I have covered with the following command. Get-Content c:\scripts\test.txt | Foreach-Object {set-aduser $_ -HomeDirectory "\\ourserver\homedir\$_"}...

View Article

Reply To: Quick question regarding Terminal Services Home Folders

Hi, i did this with ADSI $ou = [adsi]“$($OU)” $user = $ou.psbase.get_children().find($DN) $user.psbase.invokeSet(“allowLogon”,1)...

View Article

Reply To: Set applicationPoolDefaults properties

That exactly right! for example: Set-ItemProperty .\DefaultAppPool -Name queueLength -Value 2000 would double the value from 1000 to 2000. -VERN

View Article


Reply To: Set applicationPoolDefaults properties

I should add my PowerShell prompt was already in the IIS provider when I ran that. Set-Location iis: Set-Location AppPools PS IIS:\AppPools\>

View Article


Reply To: Set applicationPoolDefaults properties

I’d like to set applicationPoolDefaults not DefaultAppPool. The only way I can find is to use set-webconfigurationproperty. set-webconfigurationproperty...

View Article

Reply To: Invoke-Command Question on Remote File Server

Well, I’m back at it. This time, trying to optimize this as best as I can from a timeframe aspect. It seems that waiting on each Invoke-Command to finish on the current file server, output the results...

View Article

Reply To: Invoke-Command Question on Remote File Server

You’re on the right track. You do want to use the -AsJob switch to Invoke-Command, and save the resulting Job object to a variable. However, you don’t assign the results to (for example) $colFS10Files...

View Article

Reply To: Set applicationPoolDefaults properties

Hey Sirirako! I didn;t understand in your tweet that you wanted the AppPool defaults. You are correct! Nice job finding it! Get-WebConfiguration -Filter...

View Article


Reply To: Invoke-Command Question on Remote File Server

Thanks for that example, Dave. It’s getting me on the right path to eventually get each server stored in its own respective $colFS10files, $colFS11files, etc… variable. I think I’m getting hung up on...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Invoke-Command Question on Remote File Server

So, the remote file servers are only on v2, so the -File parameter was my issue there. I’m sacrificing some efficiency by having to include $_.psiscontainer -eq $false in the pipeline, but until I get...

View Article


Reply To: Quick question regarding Terminal Services Home Folders

Hey Selko, Oh that’s pretty cool. Haven’t heard of that before. Just wondering how this finds the correct OU? Doesnt it just .. search for itself?

View Article

Image may be NSFW.
Clik here to view.

positional parameters and parameter sets

Hi All, why does running get-service ‘background intelligent transfer service’ work? We’re doing a book club in work, based on “powershell in a month of lunches” for powershell v2 (yes, i know it’s...

View Article


Reply To: positional parameters and parameter sets

Nice catch, but it’s not quite what you think. When you call get-service ‘background intelligent transfer service’ , it really is binding to the Name parameter, not the DisplayName (which you can...

View Article

Reply To: positional parameters and parameter sets

ah, i see: name Type: System.String The name that identifies the service to the system. This can also be the display name for the service. thanks a lot Dave, that’s really helpful!

View Article

Reply To: positional parameters and parameter sets

If you are really curious, download a copy of dotPeek sometime. It’s free, and it’s what I use to investigate how PowerShell’s various bits actually work. You can run this command to identify the DLL...

View Article
Browsing all 13067 articles
Browse latest View live