Search found 1789 matches

by jhicks
Thu Apr 26, 2012 8:54 am
Forum: Other Scripting Languages
Topic: Dsadd sample script
Replies: 4
Views: 11907

Dsadd sample script

Or more specifically: dsadd user /?

Or if you just need a really simple user account use the NET USER command

net user joe P@ssword /add /domain
by jhicks
Thu Apr 26, 2012 7:24 am
Forum: PowerShell
Topic: Excluding seperate words from a string
Replies: 9
Views: 3744

Excluding seperate words from a string

Not like its the first time.
by jhicks
Thu Apr 26, 2012 1:20 am
Forum: PowerShell
Topic: Excluding seperate words from a string
Replies: 9
Views: 3744

Excluding seperate words from a string

Results should be the same, yes. But if I always recommend looking for a cmdlet that will get the job done.
by jhicks
Wed Apr 25, 2012 11:32 am
Forum: PowerShell
Topic: Understanding -and and -or operators
Replies: 18
Views: 8969

Understanding -and and -or operators

After I wrote that I figured that was probably the case. Maybe try grouping the name comparisons together.
by jhicks
Wed Apr 25, 2012 8:13 am
Forum: PowerShell
Topic: Understanding -and and -or operators
Replies: 18
Views: 8969

Understanding -and and -or operators

I still think it is a grouping issue. ( ($_.Name -like "*_db_*") -and ($_.totalsize/1gb -gt 215) -and )$_.name -notlike "*sv*")) -or ( ($_.name -like "*_log_*") -and (($_.totalsize/1gb -gt 275) -and ($_.name -notlike "*sv*")) We have to find a way to simplify ...
by jhicks
Wed Apr 25, 2012 7:37 am
Forum: PowerShell
Topic: Understanding -and and -or operators
Replies: 18
Views: 8969

Understanding -and and -or operators

For something this complex, I would enclose the different comparisons in parentheses. I can't tell from reading what you are hoping to get and PowerShell probably can't either. Is this what you are after? ($_.Name -like "*_db_*" -and $_.totalsize/1gb -gt 215 -and $_.name -notlike "*sv...
by jhicks
Tue Apr 24, 2012 3:03 am
Forum: PowerShell
Topic: Help with Boolean Function In Powershell
Replies: 11
Views: 4698

Help with Boolean Function In Powershell

Jim,
Yes, the ebook is a separate SKU. The first edition which covered v1.0 is now freely available anyway from SAPIEN.
by jhicks
Tue Apr 24, 2012 12:16 am
Forum: PowerShell
Topic: Help with Boolean Function In Powershell
Replies: 11
Views: 4698

Help with Boolean Function In Powershell

Regarding my SAPIEN Press books, even though they aren't sold specifically for the Kindle you should be able to load the PDF file on your device. I've done it with my Kindle Fire. The file shows up under Docs and not books and you don't have typical book navigation but you can at least read it.
by jhicks
Mon Apr 23, 2012 4:57 am
Forum: PowerShell
Topic: Extracting individual properties from [ADSI]
Replies: 3
Views: 1897

Extracting individual properties from [ADSI]

All of the ADSI stuff is now in the appendix in my Managing AD with PowerShell book. The Quest cmdlets will definitely make your life easier in your environment.
by jhicks
Mon Apr 23, 2012 3:23 am
Forum: PowerShell
Topic: Extracting individual properties from [ADSI]
Replies: 3
Views: 1897

Extracting individual properties from [ADSI]

What you end up with is a collection of search result objects. Each object has a properties property which is what you are after. This will help you get a look. $servers | Select -expand Properties The tricky part using ADSI is that each nested property is stored as an array. You are really making y...