|
So we're almost finished migrating to 2008R2 and Exchange 2010, and I heard on the wire that you can manipulate mailbox permissions using PS. For example, a user would call me and say that they need to give editor writes on their inbox to their new assistant. Could I do up a script in PS that would do this for me? If so, is there anything I can't do with powershell & exchange?
|
# ¿ May 7, 2011 03:52 |
|
|
# ¿ May 2, 2024 01:35 |
|
I'm no exchange admin myself, but Mailbox/Folder permissions are a daily thing. So this all looks very promising. Thanks!
|
# ¿ May 7, 2011 06:19 |
|
This will be an easy one. The following lists all subfolders of all our exchange mailboxes. code:
|
# ¿ May 21, 2012 07:36 |
|
Thanks, that sorted me out.
|
# ¿ May 22, 2012 03:28 |
|
How can I validate user input? I have a script that creates AD users, and I need to specify the users' location. There are four options, how can I ensure I dont misspell the city when I'm typing it in? Is there any way I could choose from a list of options rather than having to type?
|
# ¿ Jun 27, 2012 00:11 |
|
Thanks guys. This is working perfectly.
|
# ¿ Jun 27, 2012 23:50 |
|
I need to set a HTML signature for a stack of OWA users. I grabbed this script from the webcode:
The reason being I have 1000 mailboxes but only 500 OWA users, and I only know who they are based on whether they have a sig file in the folder. Edit: Did it all by myself! Look at me go! code:
Swink fucked around with this message at 07:03 on Sep 4, 2012 |
# ¿ Sep 4, 2012 03:15 |
|
Never mind!
Swink fucked around with this message at 12:33 on Sep 11, 2012 |
# ¿ Sep 11, 2012 11:48 |
|
Anyone else getting a shitload of yellow warning errors with 3.0? I'm getting them with every command. Although it might be the exchange2010 snapin I'm using. Also, half of the commands dont have a help entry, and update-help doesnt work. Running as Admin or otherwise.
|
# ¿ Sep 21, 2012 07:54 |
|
Am I using If statements correctly?code:
EDIT - Solved. need to use -eq instead of the "=" sign. New Question: How easy is it to create a web frontend for powershell scripts? For instance a user creation script with a dropdown box to select department. Swink fucked around with this message at 07:30 on Apr 16, 2013 |
# ¿ Apr 16, 2013 05:42 |
|
evil_bunnY posted:It would be trivial to make a CLI script user-friendly instead. You're right. You're all right. I needed that reality check. Is there a prettier method of getting the user to make a selection? At the moment I use this: Switch ($Choice) { 1 {$location = "Sydney"} 2 {$location = "Melbourne"} 3 {$location = "Brisbane"} } Which I find a bit hideous.
|
# ¿ Apr 17, 2013 00:48 |
|
Red Robin Hood posted:Has anyone gone through the CBT Nuggest Powershell videos? I just finished the first video and it seems like it is going to be a good learning experience but I wanted to get some more input. This video from Don Jones taught me everything and its free - https://www.youtube.com/watch?v=-Ya1dQ1Igkc
|
# ¿ Jul 8, 2013 03:57 |
|
I'm pulling a telephone number from AD and trying to convert it to a string, so I can use substring to get the last three numbers.code:
Edit - Solved it already. $number = get-aduser -Identity username -properties telephonenumber | select -expandproperty telephonenumber Swink fucked around with this message at 23:35 on Nov 26, 2013 |
# ¿ Nov 26, 2013 23:06 |
|
Couldn't give us a look at that script could you?
|
# ¿ Sep 23, 2014 02:49 |
|
^ I hate seeing those in scripts. I never remember which is which.
|
# ¿ Sep 26, 2014 01:21 |
|
Does a last run property actually exist? I've always assumed you need 3rd party software to track that kind of thing.
|
# ¿ Oct 12, 2014 01:34 |
|
I need to open WINWORD.EXE, wait for it to open (it loads some templates from a network share), then close it. Is there a more elegant way than using code:
|
# ¿ Dec 5, 2014 03:45 |
|
Briantist posted:You can use automation: It doesnt load anything when launching this way. I need Word to run all its "stuff" as if it was launched by a user. I managed to get it to work by opening an actual word doc that contains an "on open" Macro to quit the Word Application. It works well enough. code:
|
# ¿ Dec 10, 2014 01:20 |
|
Thats even better. Thanks. New query: Can I create an empty hashtable, fill it with data and then splat it? I'm reading data from a form, putting it in an array with the intention to use it for Set-ADUser @param This is what I have so far, but i cant call @userDetails. How should I be setting this up? code:
I have to change my hashtable keys to the same name as the command I"m going to use them on. There's no -FirstName command for set-mailbox. Swink fucked around with this message at 04:07 on Dec 11, 2014 |
# ¿ Dec 11, 2014 00:35 |
|
I'm replacing vbs login scripts with powershell versions. Whats the proper way to handle execution policy on workstations? Is it a bad idea to set them all as unrestricted? Should I sign each of my scripts? And do they need to be resigned each time they're modified? Swink fucked around with this message at 02:04 on Jan 12, 2015 |
# ¿ Jan 12, 2015 02:02 |
|
Some will, but some will just be called by the user via double clicking a batch script, or in the startup directory.
|
# ¿ Jan 12, 2015 04:38 |
|
Perfect. You are a golden goose!
|
# ¿ Jan 13, 2015 08:46 |
|
What is the go with powershell's ability to manage network gear? Could I use it to enable/disable switch ports to a schedule, or is that not how it works?
|
# ¿ Jan 18, 2015 00:06 |
|
Briantist: I just realised you're briantist.com. A blog I've referenced several times. Nice shout out from Ned Pyle the other day.
|
# ¿ Apr 27, 2015 03:16 |
|
That din jones video taught me as well. I recommend him to everyone.
|
# ¿ May 2, 2015 09:25 |
|
I've done something stupid and run a start-dscconfiguration on my workstation. Now it processes the config every 30 mins which includes renaming my PC and a heap of other poo poo I do not want. How do I tell the LCM to stop processing the DSC config?
|
# ¿ May 25, 2015 03:58 |
|
That seems to only stop an in-progress configuration. I got around it by generating a new config with no configurations and applied it.
|
# ¿ May 25, 2015 23:57 |
|
Unrelated but does that win32_product weirdness also apply when running 'wmic product' from the command line?
|
# ¿ Jul 10, 2015 04:06 |
|
I'm specifically using it for broken packages* that wont remove correctly so maybe it should still be avoided in normal scenarious. New Q: What is a simple option for source control? I want it to be free and private. Can I set up Git on Windows and sync it with Dropbox? I'd use GitHub for Windows except I dont want to pay for a private repository at this stage. *Java Swink fucked around with this message at 12:21 on Jul 15, 2015 |
# ¿ Jul 14, 2015 02:41 |
|
Right, cool. I was unfamiliar with the relationship with git, github and other services like bitbucket. I'm familiarish with command line Git so I'm happy I can just use that. Private repos on BitBucket is handy. hihifellow posted:So I was using this for software uninstalls, and after all the posts here I went looking for alternatives and found the regkey HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall which lists everything installed on the system by UID along with the uninstall string, which if it's an MSI is just "MSIEXEC /X{UID}". Was easy to script and faster to boot, since everything I'm working with is installed via MSI anyway. This is the way I usually enumerate and unininstall programs. Swink fucked around with this message at 12:06 on Jul 15, 2015 |
# ¿ Jul 15, 2015 05:31 |
|
Double post but I wanted to seperate this out. I'm trying to focus on abstraction and parametising the stuff I write so I can be a ~good coder~. I'm having trouble figuring out when and why its necessary on some scripts. Take this script I wrote to warn users of an impending password expiry. It's going to run every day or so as a scheduled task. How could I improve it? What could I gain by improving it? Is this an example of a script that doesnt really need to be anything more than it is? code:
|
# ¿ Jul 15, 2015 12:20 |
|
Good responses, thanks all.Ithaqua posted:Can't you just configure the group policy that notifies users literally every time they log in that their AD password is going to expire in [X] days? The answer to this was already put forward, but I've had the CEO overseas with only his iPad. He got locked out and had to wait until he was back in local business hours to get support. The email is specifically for that scenario. Plus stacks of users just dont heed the popup. Briantist, you just demonstrated supreme aptitude. The HTML template has applications to some other god-awful scripts I have in place. For me and my current org I don't see the value of parametrizing that particular script in this particular scenario. You've left me with a great example for the future though.
|
# ¿ Jul 16, 2015 04:17 |
|
For exchange you need to add-pssnapin <name of the exchange snapin> I have no idea why it's different to say, AD, which is a module that can auto-load. I'll grab the exact snappin name in when I'm back at my desk. It'll be different depending which version you're running. I run 2010 so YMMV for other versions. Edit: For Exchange 2010 SP3: code:
code:
Swink fucked around with this message at 01:37 on Jul 21, 2015 |
# ¿ Jul 21, 2015 01:20 |
|
^ Yeah or just do that.
|
# ¿ Jul 21, 2015 01:39 |
|
Tony Montana posted:What are the major features of 5 that I should be aware of? The goddamn package manager! code:
|
# ¿ Jul 21, 2015 02:31 |
|
I've wasted hours on that same thing.
|
# ¿ Aug 5, 2015 03:52 |
|
I hate that % alias.
|
# ¿ Sep 4, 2015 04:46 |
|
Is anyone using the http://psappdeploytoolkit.com and is it a worthwhile thing to use in a SME? edit - for context, we install\update software via GPO however with more and more mobile staff, less people are actually booting up in the office so I need a method to push out software when the machine is online. Swink fucked around with this message at 08:24 on Sep 15, 2015 |
# ¿ Sep 15, 2015 08:19 |
|
Doug posted:I can't comment specifically on that, but we use PDQ Deploy and it's been really great. [/url] I'm all about PDQ the beauty of the powershell toolkit (for me) is the notifications for the users. Allows them to defer etc. Might be question for the windows thread.
|
# ¿ Sep 16, 2015 00:07 |
|
|
# ¿ May 2, 2024 01:35 |
|
Double post for this: https://twitter.com/Johnmroos/status/643915357384740865 PowershellGet Support in PS 3.0 and 4.0
|
# ¿ Sep 16, 2015 03:30 |