Powershell checking if OU exist
Powershell checking if OU exist
Powershell checking if OU exist
Most of the time, when adding an SCCM Collection based on installed software, I’ll simply use the Add/Remove Programs Attribute Class. However, in a recent case, the installed software doesn’t show up in Add/Remove Programs, but it is an MSI installer. In this particular instance, I wanted to remove the Java Updater. Since approximately 1.6.18 / 6.0 update 18, Oracle
After starting work on a function, I stumbled across the sourced link. I wanted to expand on that post. That simple method only works well if the LDAP Path is clean. If you’re possibly working with unclean data (or typo the DC structure), you’ll need to catch your errors. https://gist.github.com/VertigoRay/6091753 Since DC=domain,DC=com doesn’t exist (or at least isn’t accessible for an
Did a lot of digging to find the details needed so that I can write a Reg Ex to validate an AD Group SamAccountName. Here’s what I got and I wanted to share … (^[^. “”/\[]:|\+=;?*][^””/\[]:|\+=;?*]{1,63})(?(1)|[^.]$) This translates to: Not Starting with a period (.) or a space ( ). This, by design, excludes strings consisting solely of all periods (.)
Just messing around here, but thought others might want to know how to randomly (or intelligently) grab a color. There’s basically three parts to this process. Get the number of colors. Grab a random color. Apply the color. I’ve done the above three steps in these three lines of code … $max = [System.ConsoleColor].GetFields().Count – 1 $color = [System.ConsoleColor](Get-Random -Min
PowerShell – Checking if OU exists After starting work on a function, I stumbled across this. Linked it here for a quick reference. Nice …
While trying to find a quick answer to search across domains for duplicated user accounts, I came across a blog (sourced) that pointed me in a good direction. To skip the meat of it, we have a Global Catalog setup on our AD and I found it more useful to target that and search the entire forest, then to attach
Gmail has a feature that lets you send messages from other addresses. “Gmail’s custom ‘From:’ feature lets you use Gmail to send messages with another of your email addresses listed as the sender in place of your Gmail address. This way, it’s easier to manage multiple accounts from the Gmail interface.” A small inconvenience is that Google needs to include
I use a global variable to pick a Domain Controller so that I’m not constantly bouncing back and forth between Domain Controllers when running scripts. This helps to mitigate errors due to replication delays (normally, just a few seconds). For Example, when you’re scripting and try to run Set-ADUser command followed immediately by a Get-ADUser command without specifying the -Server
Most people are aware of this by now, but I thought I’d post a quick follow-up to a previous post of mine … I have an iPhone and love it, except for the fact that it’s very user friendly. What do I mean? I’m more of a technical user. The fact that the iPhone is so easy to use, makes it hard to do slightly