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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply To: AD module in window server 2008
As we indicated, the module was available for 2008 R2 and later.
View ArticleTesting 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleGenerate 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticlePowershell 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