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

Reply To: Help Iterating Through .CSV File to Update AD

Mike, Thanks for the reply. I tried the "foreach-object" code and received the following error: Set-QADUser : Cannot convert 'System.Object[]' to the type...

View Article


At the end of my wits – Exporting data to MS Word 2007 form fields.

Hey guys, I am currently having a problem that I cannot for the life of me figure out, Also I am extremely new to powershell, Watch the MVAs and I am currently on my first script. The problem seems...

View Article


Reply To: Help Iterating Through .CSV File to Update AD

I created an InputFile that looks like this: "EmployeeID"|"Assistant"|"Manager" "1"|"2"|"3" "2"|""|"1" "3"|"5"|"6" "4"|"5"|"6" "5"|"6"|"" "6"|"7"|"" "7"|""|"6" Assuming that more than one person...

View Article

Q: Get-counter Process(*)\… does not work

Hi all, I'm trying to collect perfmon data from multiple remote machines regarding their process. I thought putting in a wildcard "Process(*)\…" would solve this but all get is an error: get-counter :...

View Article

Correct way to use the Group Resource

Hi, I am trying to create some local groups and add Domain members to those groups. So far I have this: $systemID = $env:COMPUTERNAME $ConfigurationData = @{ AllNodes = @( @{ NodeName=$systemID...

View Article


Creating a domain controller and no auto-reboot

I'm using the xActiveDirectory DSC resource kit and the xAdDomain to setup my DC like this: xADDomain FirstDS { DomainName = $DomainName DomainAdministratorCredential = $AdministratorCred...

View Article

Reply To: Creating a domain controller and no auto-reboot

That error may be throwing off the usual behavior somehow. Your LCM configuration looks fine, but the fact that it can't find Install-ADDSForest is a bit odd. What operating system are you targeting...

View Article

How to process multiple ValidationSet parameter attribute values efficiently?

I have an advanced function I have been working on that looks something like this: {Function Do-Something { [cmdletbinding()]   Param ( [Parameter(Mandatory=$true, [ValidateSet('Yes', 'No', 'Y', 'N',...

View Article


Reply To: How to process multiple ValidationSet parameter attribute values...

Well, in this specific case, I'd probably just look at the first letter of each parameter, since you know that they can only be Y/Yes or N/No. That would cut down on half of your conditions: if...

View Article


Reply To: How to process multiple ValidationSet parameter attribute values...

Ahh the switch parameter, of course. I've used them before on several occasions a while back. Had a brain fart there man. Thanks

View Article

Reply To: How to process multiple ValidationSet parameter attribute values...

To use the switch parameter, would I remove the "Mandatory=$true" attribute?

View Article

Reply To: VBS to PowerShell

Thanks Tim for your help. Although I am new tp PS world, your code is easy to follow. Only thing I need to understand from [pscustomobject] part.

View Article

Reply To: Setting Retention Policy Issues

Hey Marl, At first glance, just looks like you a new line. Instead of : $UserMailboxes = Get-Mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $UserMailboxes | Set-Mailbox –RetentionPolicy...

View Article


Image may be NSFW.
Clik here to view.

Reply To: How to process multiple ValidationSet parameter attribute values...

Yes. Mandatory switches don't make much sense.

View Article

Reply To: Setting Retention Policy Issues

Thank you for the information. I checked everything is morning and all the retention policies were set. I did not get a chance to run your script but it does look correct from my knowledge of...

View Article


Reply To: Creating a domain controller and no auto-reboot

It is 2008 R2 SP1. I suspected that but I couldn't find anywhere that mentioned xActiveDirectory was only for Server 2012. Thank you.

View Article

Problem with certbased authentication at powershell remoting

Hi, I'm looking for some help at a problem to manage a couple of servers outside of our domain with powershell remoting. I followed the guide "Secrets of PowerShell Remoting" and configured a...

View Article


Reset SCOM 2012 Health State Monitor script needed

I am getting numerous SCOM Heath Monitor alerts for the following 2 conditions: AD Domain Availability Health Degraded AD Site Availability Health Degraded I have searched the internet for scripts to...

View Article

Reply To: Correct way to use the Group Resource

I've had the same issue as discussed in my post here – http://powershell.org/wp/forums/topic/issue-adding-users-to-a-group/ Don replied to me and pointed me towards some info that may help you. I've...

View Article

Reply To: Correct way to use the Group Resource

Are you getting an error? If so, can you post it?

View Article
Browsing all 13067 articles
Browse latest View live