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

Reply To: Need to run .exe with parameters on multiple remote machines

Hmm? I use this all the time. I use PS v3 and v4 but haven’t tried it on v1 or v2, not sure if there’s a difference there. Also it’s important to have the ampersand (&) in there so powershell...

View Article


Reply To: Need Help with Advanced Functions

Maybe I’m misunderstanding but your method seems a bit inefficient? For instance if each of your list files have 10 items in them (10 computers / 10 users) your script will create 10 groups in AD, all...

View Article


Reply To: Need Help with Advanced Functions

My apologies, I didnt explain that very good. The way it works is like this: 1. A user (in this case only Systems Analysts) request to be local admins to test applications on their test boxes 2. They...

View Article

Reply To: Need Help with Advanced Functions

It does! It also sounds like a nightmare to manage, kudos to you and your team. Like Richard Siddaway said, it’d be easier to tweak what you have so far. Sounds like you just need to add a param block...

View Article

Reply To: AD module in window server 2008

Ok thanks for answers! Its a dc Windows server 2008(not R2). Ive installed all updates, PowerShell feature and the rsat role. NO AD module .. so no AD module on win server 2008 32 bit ??

View Article


Reply To: AD module in window server 2008

As we indicated, the module was available for 2008 R2 and later.

View Article

Testing for property existance

Is there a simple way to test if a property exists on a given object under PoSH 3? I have a number of cmdlets which return objects with alternate sets of properties, depending on their results. In my...

View Article

Reply To: Testing for property existance

Well, my developer answer would be that your command output should be considered a contract, and should be consistent, even if some properties sometimes have null values. Or, give your output object a...

View Article


Reply To: Testing for property existance

I assume you’re using Set-StrictMode, if you’re getting errors when you try to access a non-existent property. By default, PowerShell just returns $null when you do that. To test for the existence of...

View Article


Reply To: Need Help with Advanced Functions

Hell yes it is a nightmare, but that’s the way this place is at times. Just gotta go with the punches. Anyway, I have written a separate advanced function to help me understand how advanced functions...

View Article

Generate a Function Script

I need to generate a function script that creates a folder using a username passed to it through a parameter. Also it can’t make duplicates by making one that already exists, because that would make...

View Article

Reply To: Scheduled Job Frustration

I have same problems. When executing register-scheduledjob: powershell is running with my admin account and $cred is servacc, daily works fine but weekly is corrupted every time when executed....

View Article

Reply To: Generate a Function Script

There are functions, and there are scripts. I’m not sure what you mean by a “function script.” The rest of it is pretty straightforward, but there are a couple details left out: What should the script...

View Article


Reply To: Need Help with Advanced Functions

You’ve already done that. Aside from the common parameters that you get for free when writing an advanced function (-Verbose, -ErrorAction, etc), the only parameter defined for your function is...

View Article

Reply To: Generate a Function Script

Sorry for it being confusing, I need a script. 1. I need it to send something along the lines of an error message saying that the name already exists. 2. The user should be able to input the the...

View Article


Reply To: Generate a Function Script

OK, something along these lines should get you started: [CmdletBinding()] param ( [string] $Path = '.', [Parameter(Mandatory = $true)] [string] $UserName, [Parameter(Mandatory = $true)] [string]...

View Article

Reply To: Get-ADComputer Script Best Practice

@Don Jones – That makes sense, I am just confused as why the variable wasn’t working. @Richard Siddaway – That worked like a champ. So I watched Jason Helmick and Jeffrey Snover, on the MVA PowerShell...

View Article


Reply To: Get-ADComputer Script Best Practice

“Name -like ‘$PartialName’” is a double-quoted string; any variables inside of it get expanded. The single quotes inside that string are just text; they don’t receive any special treatment from...

View Article

Reply To: Generate a Function Script

Thank you very much. This works perfectly.

View Article

Powershell remoting timeout

I am trying to return all the users in active directory from a remote computer. I am using the Quest AD Cmdlets. The search finds 300 users and then hangs and the message I get back is this: The...

View Article
Browsing all 13067 articles
Browse latest View live