Month: December 2011
-
Updated PowerShell to determine if a user is visiting the office
I made an error. More like an incorrect assumption in this post, specifically this code.: My incorrect assumption was that the AD PowerShell components were installed on every machine (they are only my machine). I needed to rewire this code above to use ADSI, since Get-ADGroupMember is not on everyone’s machine. Below is that code:
-
PowerShell wrapper function to display a dialog box
I wanted a function that I could pass some text, and it would put that text in a dialog box for the user to click okay. Simple, but I will reuse it I am sure.
-
After removing last Exchange 2003 Server, mail enabled public folders no longer work
We decommissioned our last Exchange 2003 server the other day. All seamed well and I thought we were done. Nope. A few days later we had our scheduled downtime to apply patches, and I rebooted all three of our Exchange 2010 servers (for the record we are Exchange 2010 SP1 UR3 v3). Next morning people were…
-
PowerShell script to change default prf imported when Outlook starts up for the first time
In this previous post, I talk about how we use Office Customization Tool (OCT) and “.prf” files to deploy Office 2010. Continuing with the idea that I want to know if a person is visiting from another office, I want to be able to switch from our default of “cached mode” to “online mode” for…
-
Command to enable windows backup feature on Server 2008 R2
One liner: DISM /online /Enable-Feature /FeatureName:WindowsServerBackup /Quiet /NoRestart
-
A script to loop through a WordPress database and search for text
We maintain both a WordPress development environment and a production environment. I have written a script that copies a WordPress site to the local machine. In that script I change the GUID (even thought this page says you shouldn’t), siteurl, and home. I change the GUID, because the site has not been publicly accessible, so I…
-
Xcopy vs Robocopy
This is news to me: “Xcopy fails with insufficient memory when the path plus filename is longer than 254 characters” Robocopy it is from now on!
-
PowerShell: Two functions to determine if a user is visiting the office
If you have users in distribution groups associated with each site in your organization, it should be easy to tell if a user is visiting from another office (more on why I want to do this later). First function returns the current site that the user is logging into: The second function loops through all…
-
PowerShell to verify ACLs (permissions) on a folder
In my previous post, I showed how to create a new ACL and apply it to a folder. Why apply it to the folder if the folder is already set correctly? I wrote the following function to compare the ACLs of a folder to a desired set of ACLs (either created by hand (lines 3-12) or…
-
PowerShell to assign permission to a folder (not copy inherited permissions)
In my previous post, I used PowerShell to change the permissions of a top level folder. In that script, I took the folder in question and copied the inherited permissions to it, and then I tinkered it to be what I wanted. I wanted to do something similar, but I wanted a set of permission…
