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

Pulling ADUser Info

I am little confused about why my little script I wrote is not having an output. In the beginning I have a read-host and unless I’m not understanding at all, I was under the impression that the $user...

View Article


Reply To: Pulling ADUser Info

You probably don’t need all of that. You can probably do: Get-ADUser $user It automatically runs that against the -Identity parameter instead, and tries to match against name, CN, and samAccountName....

View Article


Reply To: Pulling ADUser Info

Just for giggles, try it like this. The -Filter parameters to the AD cmdlets actually accept strings, not ScriptBlocks (though all the examples show the wrong syntax, which can be confusing.)...

View Article

Reply To: Pulling ADUser Info

Just had another thought on this: Does your $user variable’s value contain wildcards? If so, you’d need to change those -eq operators back to -like in my example (and that might also explain why it’s...

View Article

Reply To: Pulling ADUser Info

Mr. Jones and Mr. Wyatt, Thank you for the quick reply and correction. The problem was the script blocks. I was using SAMAccount and SN as tests, because my small vm test network doesn’t have exchange...

View Article


Reply To: C# code to powershell

This got me interested, so I’ve been tinkering with code to allow one to call a generic method with a single PowerShell command (and to make it as robust as possible.) After I worked on this for a...

View Article

Reply To: Enable Basic Security

Thanks for the quick reply Dom. The goal is to have a simple solution no real preference, my thought was configuring the client to enable Basic authentication over a non-SSL connection. On re-reading...

View Article

Reply To: Enable Basic Security

You can do hat you want – you need to add the target computer to the local computer’s TrustedHosts list, and provide a credential. Otherwise it wants SSL. It isn’t so much about encryption as it is...

View Article


How to NOT Have Redundancy

If I want to create an advanced function where a $ComputerName parameter can have either the name of a computer obviously, or where it can have another value like “ComputerList” that would indicate...

View Article


Reply To: How to NOT Have Redundancy

There are several good answers. My personal preference would be to rig your computer name parameter to accept pipeline input. That way it doesn’t worry where the names come from. Could be a text file,...

View Article

Reply To: How to NOT Have Redundancy

I want to do whatever follows best practices and less typing. The reason I like to use the -ComputerName “ComputerList” is because I like to tell PowerShell to create and open up a blank...

View Article

Reply To: How to NOT Have Redundancy

So, the idea is to separate those things as much as possible. For example, the idea of opening a blank file, collecting names in a GUI, something like that – it’s good, but you’d want that ability in...

View Article

Reply To: How to NOT Have Redundancy

DAMN Don! You reply fast dude, that’s awesome. I bought all your books, actually, just this year back in January. I browse through them when I have the time, but I have tons of projects I work on...

View Article


Reply To: How to NOT Have Redundancy

Maybe a bit of both :). But it’s a weekend, that’s ok. It’s a shame you can’t use SCCM, that being pretty much the whole point of having it! But good luck – sounds like a worthy thing to try and...

View Article

Reply To: How to NOT Have Redundancy

Okay, my wife at least kept that box in a very accessible location in the house. I was able to retrieve it, registered it on Manning’s site, and now I downloaded the PDF. I will browse through this...

View Article


Facing error in Powershell Remote Session

Hi All, I need to execute powershell on servers behind firewall, i set server to use 8530 port (which we opened for patching) so i can reach DMZ server from Non-DMZ via 8530. Below commands Configured...

View Article

Access is Denied error

I created a PSSession to a Hyper-V host from my admin server while logged in as a domain administrator. When I tried to copy a file from a share on the admin server to the local dir on the Hyper-V...

View Article


Reply To: Access is Denied error

I just re-read the error and it says that “Cannot find path ‘\\admin1\certs\certfile.pfx’ because it does not exist.” I copied and pasted the same command via the RDP session and it worked.

View Article

Reply To: Access is Denied error

This sounds like a “double hop” issue where you are trying to access a remote system while currently in a pssession on a different remote system. This is because the Hyper-V host will not delegate...

View Article

Reply To: Access is Denied error

Thanks Boe. It wasn’t a Powershell “double hop”, but I was connected to my PC via RDP so I guess it could be the same thing. I’ll try it directly from my PC today and see if it works.

View Article
Browsing all 13067 articles
Browse latest View live