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

Reply To: Learning – Don Jones

Don’t forget his youtube channel. . . https://www.youtube.com/user/powershelldon -VERN

View Article


What do you use to check if all folders/files are the same in all servers?

Currently at my workplace we are using fciv.exe with vbscript that was created long before I got this job. Now I am trying to use msdeploy in powershell with -whatif -checksum options to see if there...

View Article


Reply To: syncing system time with the internet

My solution was to actually use a batch for right now and just do the following and it worked just fine. w32tm /resync

View Article

Reply To: What do you use to check if all folders/files are the same in all...

Any program that generates checksums basically has to do the same thing (read the entire file from disk, perform some crypto calculations on the data), and you’re not likely to improve performance on...

View Article

Reply To: DSC: Lab based training

I’ve been meaning to ready through, and follow along with Murawski’s write-ups, but it’s a matter of time and ability to focus at work. The real answer is probably to take a day off and lock myself...

View Article


Reply To: Using powershell to import a csv file for OU's

You don’t have to be on a specific server, the previously shared code could be run from any machine with RSAT tools. Otherwise, you would need to use ADSI to create the OU’s: # OU.csv # #”Name”,”Path”...

View Article

Reply To: Using powershell to import a csv file for OU's

Well I went an built a server 2012 virtual machine and been trying to figure things out from there. Tried running the script with changing where my spread heet is located and got errors. Attached are...

View Article

Reply To: Using powershell to import a csv file for OU's

Did you test creating a single test OU to validate the code? Try running something simple like this: $OU = [adsi]“LDAP://DC=YourDomain,DC=com” $CreateOU = $OU.Create(“OrganizationalUnit”,“OU=Test”)...

View Article


Reply To: Using powershell to import a csv file for OU's

Well I tried to do a test but came up with errors again. Less errors though (see attached).

View Article


Removing Computers from SCCM Collection

Below is a simple little script that removes a computer from SCCM collection. The script works fine removing one computer at a time. I would like to have the option of removing one or multiple...

View Article

Best way to build a collection out of MSMQ

Here is my challenge. I’ve taken a script that used to take a couple hours to process. Now, by leveraging jobs, I was able to reduce it to 2 minutes. Since this script does a large amount of output,...

View Article

Reply To: Best way to build a collection out of MSMQ

There are a couple of options. You can use the .NET List or ArrayList classes, or you can create a PowerShell function that just ouputs the objects, and let the engine take care of turning it into a...

View Article

Reply To: DSC: Lab based training

Microsoft has a TechNet DSC Virtual lab that might also help https://vlabs.holsystems.com/vlabs/technet?eng=VLabs&auth=none&src=microsoft.holsystems.com&altadd=true&labid=10846

View Article


Reply To: Best way to build a collection out of MSMQ

Sounds like the second method is what I want to use, just not sure how to implement it with what I have. For example, here is out the object is created: [xml]$UpdatedUsers = “<user>...

View Article

Reply To: Best way to build a collection out of MSMQ

What happens when the queue is empty and you call Receive-MSMQueue? Does it just return $null, or does it produce an error? In this case, you don’t even need to have a function, if you don’t want to....

View Article


Image may be NSFW.
Clik here to view.

Reply To: Best way to build a collection out of MSMQ

Yes, it returns $Null when it’s empty. I think this is exactly what I’m looking for. I’ll plug this in on Monday and let you know how it goes. Thanks so much, you just made my weekend!

View Article

Image may be NSFW.
Clik here to view.

Reply To: Best way to build a collection out of MSMQ

No problem! Here’s a shorter way of writing that, if you don’t mind assigning variables inside your loop condition: $UserInfo = while ($null -ne ($object = Receive-MSMQueue -Name "UpdatedUsers"...

View Article


Reply To: syncing system time with the internet

For best practice any domain member computer should sync time with the PDC Emulator FSMO role holder on the domain. w32tm /config /syncfromflags:domhier /update Restart-Service w32time You should not...

View Article

Remote Session from non-Domain Computer

I have powershell up and running on all clients and the server in an SBS2008 environment. Establishing remote sessions to the clients, server etc work just fine. My question is can I establish a...

View Article

Reply To: Remote Session from non-Domain Computer

You can, but you either need to be using an HTTPS listener, or you need to configure the TrustedHosts list on your client.

View Article
Browsing all 13067 articles
Browse latest View live