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

Work an Array in Batches of 5

Morning folks (UK Time) I have looked everywhere and i cannnot find anything to do with this admittedly im fairly new so i’l explain the problem first…then my potential solution… I am writing a script...

View Article


Reply To: Adding current logged on user to Managed By attribute of computer

I used this PowerShell script: $searcher = new-object System.DirectoryServices.DirectorySearcher $searcher.filter=”(&(ObjectClass=computer)(Name=$env:computername))” $find = $searcher.FindOne()...

View Article


Reply To: Adding current logged on user to Managed By attribute of computer

I have to be patient, after some time Managed By attribute was populated with logged on user DN. Great!!!

View Article

Reply To: Work an Array in Batches of 5

EDIT : Think ive found a way to do it in batches of 5….ish… its using this do while loop to be honest its just an attempt im not quite sure how im going to implement this into my script! $i = 0 $t = 0...

View Article

Reply To: Creating a persistent remote Exchange Shell session.

Hi, Maybe you nede to post the contents of your function. Hard to help without it Cherrie Tore

View Article


Reply To: Work an Array in Batches of 5

Wohooo ive managed to do it! Took me sometime but if anyone wants to do this my below code was this… $i = 0 $t = 0 $x = 0 $ary = import-csv c:\script\testGB.csv $Batch = @() do { $x++ do { #$ary[$t]...

View Article

Reply To: Work an Array in Batches of 5

You could simply pass your entire array to Invoke-Command without using New-PSSession first. It will handle the queue behind the scenes for you. For example, instead of this: invoke-command -session...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Work an Array in Batches of 5

Ahh brilliant! i had thought of that earlier in the week i had tried it and failed! but that works brilliantly! i must of been using it as -session instead of -computer! thanks any ideas on how to...

View Article


Reply To: Creating a persistent remote Exchange Shell session.

There are some known problems I’ve heard of regarding Exchange and implicit remoting. I’ll see if I can point someone to look at this, who might have more experience.

View Article


Reply To: Work an Array in Batches of 5

You should get non-terminating errors for any computer that couldn’t be contacted. I tend to use -ErrorVariable to capture those: Invoke-Command -ComputerName $listOfComputers -ScriptBlock {...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Creating a persistent remote Exchange Shell session.

I can confirm this is an issue, although I can’t explain it. I ran the commands directly on a server with Exchange 2010 SP3 to eliminate any remoting issues. Server is running Windows Server 2008 R2...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Creating a persistent remote Exchange Shell session.

@Tore Groneng: My script has no functions, it is exactly what I have quoted in my 1st post @Don Jones: Thanks for the help. @Mike F Robbins: Yes, you hit it spot on, this is what I get as well. I am...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Creating a persistent remote Exchange Shell session.

Jut saw that Rob Campbell (@mjolinor) posted on twitter that it’s an issue with the default formatting. Piping it to Format-List shows the properties: µ

View Article


Image may be NSFW.
Clik here to view.

Reply To: Creating a persistent remote Exchange Shell session.

It’s because the first command sets the pipeline up for only the Identity and MaxRecipientEnvelopeLimit properties. When the second command runs, the pipeline doesn’t know anything about the...

View Article

Reply To: Creating a persistent remote Exchange Shell session.

Here’s a good old article from Jeffrey Snover himself that explains why this is:

View Article


Reply To: Creating a persistent remote Exchange Shell session.

Um, OK. Here’s the link:

View Article

Reply To: Creating a persistent remote Exchange Shell session.

View Article


Reply To: Creating a persistent remote Exchange Shell session.

OK, I obviously have no idea how to use the markup here to add a link: http://blogs.msdn.com/b/powershell/archive/2006/04/30/how-powershell-formatting-and-outputting-really-works.aspx

View Article

Reply To: Scheduled Job Frustration

I encountered the same issue. There is an open file on Connect @...

View Article

Reply To: Creating a persistent remote Exchange Shell session.

@Jeffrey Smith : Thanks for the link, will try to digest it. @Mike F Robbins : Thanks for the explanation. But now I ran into another problem. Format-List will conflict with some of the cmdlets that...

View Article
Browsing all 13067 articles
Browse latest View live