PowerShell query for AD group
Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * * The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission. * * In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets** ** At Home yesterday. * * We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * * The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. * ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: PowerShell query for AD group
If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * * The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission. * * In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets** ** At Home yesterday. * * We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * * The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. * ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: PowerShell query for AD group
Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.comwrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * * The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission. * * In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets** ** At Home yesterday. * * We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * * The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. * ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by
RE: PowerShell query for AD group
Generally you use the select-object (alias: select) statement. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: James Rankin [mailto:kz2...@googlemail.com] Sent: Monday, July 11, 2011 12:48 PM To: NT System Admin Issues Subject: Re: PowerShell query for AD group Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the skip parameter in an old for /f command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are Name Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.commailto:sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.commailto:kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. * IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission. In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana
RE: PowerShell query for AD group
Exchange has Get-Group and Get-DistributionGroup. The AD cmdlets have Get-ADGroup. And it's trivial to do with ADSI. I wouldn't install the Quest cmdlets just for that. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: James Rankin [mailto:kz2...@googlemail.com] Sent: Monday, July 11, 2011 12:10 PM To: NT System Admin Issues Subject: PowerShell query for AD group Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. * IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission. In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: PowerShell query for AD group
Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * *The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission.* *In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. * *We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * *The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. * ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog
Re: PowerShell query for AD group
List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * *The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission.* *In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. * *We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * *The comments and opinions expressed herein are my own and NOT those of my employer, who, if he knew I was sending emails and surfing the seamier side of the Internet, would cut off my manhood and feed it to me for afternoon tea. * ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise
Re: PowerShell query for AD group
Cheers. I was actually thinking about getting some PS material when last month's invoices get paid :-) Sent from my POS BlackBerry wireless device, which may wipe itself at any moment -Original Message- From: Steven Peck sep...@gmail.com Date: Mon, 11 Jul 2011 10:12:30 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com Reply-To: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.comSubject: Re: PowerShell query for AD group List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * *The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission.* *In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. * *We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm
Re: PowerShell query for AD group
Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * *The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you pass them on via email, be sure to include a disclaimer regarding liability for transmission.* *In the event that the originator did not send this email to you, then please return it to us and attach a scanned-in picture of your mother's brother's wife wearing nothing but a kangaroo suit, and we will immediately refund you exactly half of what you paid for the can of Whiskas you bought when you went to Pets At Home yesterday. * *We take no responsibility for non-receipt of this email because we are running Exchange 5.5 and everyone knows how glitchy that can be. In the event that you do get this message then please note that we take no responsibility for that either. Nor will we accept any liability, tacit or implied, for any damage you may or may not incur as a result of receiving, or not, as the case may be, from time to time, notwithstanding all liabilities implied or otherwise, ummm, hell, where was I...umm, no matter what happens, it is NOT, and NEVER WILL BE, OUR FAULT! * *The comments and opinions expressed herein
Re: PowerShell query for AD group
Haven't read that one. I would say check out the Admin Crash course and and v2 owners manual for introductory overviews on the subject and then decide from there what you may purchase. Mastering PowerShell covers v1 of PowerShell but is still a solid introduction and still has a ton of useful information on scripts and functions. It was originally set to be published but the field for v1 books grew crowded so Idera bought the rights and published it for free. I am a scripting hack myself and piece together things that manage to work. What I have been doing at work is spending the last few years making sure our environment is ready for it when people started to use it. Most of my co-workers use some PowerShell now. We had v1 distributed to all the servers and when v2 was released, we upgraded across the board and set a GPO to enable remoting. It was awesome not having to RDP into 20 server to test ping our backup network when they misconfigured something and broke half that networks settings across our vmware hosts. Just a script to run when networking wanted me to test $servers = get-content ./servers.txt foreach($server in $servers) { Invoke-Command -ComputerName $server -ScriptBlock { test-connection bkserver.example.com -quiet } On Mon, Jul 11, 2011 at 10:28 AM, Joseph Heaton jhea...@dfg.ca.gov wrote: Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress
Re: PowerShell query for AD group
What's the GPO that enables remoting? Sent from my POS BlackBerry wireless device, which may wipe itself at any moment -Original Message- From: Steven Peck sep...@gmail.com Date: Mon, 11 Jul 2011 10:58:13 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com Reply-To: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.comSubject: Re: PowerShell query for AD group Haven't read that one. I would say check out the Admin Crash course and and v2 owners manual for introductory overviews on the subject and then decide from there what you may purchase. Mastering PowerShell covers v1 of PowerShell but is still a solid introduction and still has a ton of useful information on scripts and functions. It was originally set to be published but the field for v1 books grew crowded so Idera bought the rights and published it for free. I am a scripting hack myself and piece together things that manage to work. What I have been doing at work is spending the last few years making sure our environment is ready for it when people started to use it. Most of my co-workers use some PowerShell now. We had v1 distributed to all the servers and when v2 was released, we upgraded across the board and set a GPO to enable remoting. It was awesome not having to RDP into 20 server to test ping our backup network when they misconfigured something and broke half that networks settings across our vmware hosts. Just a script to run when networking wanted me to test $servers = get-content ./servers.txt foreach($server in $servers) { Invoke-Command -ComputerName $server -ScriptBlock { test-connection bkserver.example.com -quiet } On Mon, Jul 11, 2011 at 10:28 AM, Joseph Heaton jhea...@dfg.ca.gov wrote: Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were
Re: PowerShell query for AD group
I didn't set it up but my co-worker says he just used this blog instructions http://blog.powershell.no/2010/03/04/enable-and-configure-windows-powershell-remoting-using-group-policy/ if you do : get-help about_remote you will see a buch more info. On Mon, Jul 11, 2011 at 11:02 AM, kz2...@googlemail.com wrote: ** What's the GPO that enables remoting? Sent from my POS BlackBerry wireless device, which may wipe itself at any moment -- *From: * Steven Peck sep...@gmail.com *Date: *Mon, 11 Jul 2011 10:58:13 -0700 *To: *NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com *ReplyTo: * NT System Admin Issues ntsysadmin@lyris.sunbelt-software.com *Subject: *Re: PowerShell query for AD group Haven't read that one. I would say check out the Admin Crash course and and v2 owners manual for introductory overviews on the subject and then decide from there what you may purchase. Mastering PowerShell covers v1 of PowerShell but is still a solid introduction and still has a ton of useful information on scripts and functions. It was originally set to be published but the field for v1 books grew crowded so Idera bought the rights and published it for free. I am a scripting hack myself and piece together things that manage to work. What I have been doing at work is spending the last few years making sure our environment is ready for it when people started to use it. Most of my co-workers use some PowerShell now. We had v1 distributed to all the servers and when v2 was released, we upgraded across the board and set a GPO to enable remoting. It was awesome not having to RDP into 20 server to test ping our backup network when they misconfigured something and broke half that networks settings across our vmware hosts. Just a script to run when networking wanted me to test $servers = get-content ./servers.txt foreach($server in $servers) { Invoke-Command -ComputerName $server -ScriptBlock { test-connection bkserver.example.com -quiet } On Mon, Jul 11, 2011 at 10:28 AM, Joseph Heaton jhea...@dfg.ca.govwrote: Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question
RE: PowerShell query for AD group
I got Learn PowerShell in a Month of Lunches after seeing Don at a local Microsoft event. I found the book helpful and useful since I was learning PowerShell. He gives a few examples and builds from there. The book is good for those wanting to learn in my opinion. At least it was for me. I also got the Windows PowerShell in Action book by Bruce Payette. A much more comprehensive book that covers probably everything about PowerShell. To me this book is an intermediate/advanced level book. Reading different articles and such has also helped. My biggest problem is actually being able to use the commands to do things. Without using PowerShell for a while I find myself forgetting things and having to lookup how to write the command. I'm talking something beyond the basics as the more common commands I have saved to reuse whenever I need them. Art -Original Message- From: Joseph Heaton [mailto:jhea...@dfg.ca.gov] Sent: Monday, July 11, 2011 10:28 AM To: NT System Admin Issues Subject: Re: PowerShell query for AD group Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx** ** I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide afterwards, but I am starting to digress.. * *The originator of this email is not liable for the transmission of the information contained in this communication. Or are they? Either way it's a pretty dull legal query and frankly one I'm not going to dwell on. But should you have nothing better to do, please feel free to ruminate on it, and please pass on any concrete conclusions should you find them. However, if you
Re: PowerShell query for AD group
I have the same memory propblem. I fire up PowerShell console and ISE when I get in in the morning. I have a 'snippets.ps1' file where I put various pieces in that I can refer to later and I post some of the scripts I do on my site to help me remember. On Mon, Jul 11, 2011 at 11:37 AM, Art DeKneef art.dekn...@cox.net wrote: I got Learn PowerShell in a Month of Lunches after seeing Don at a local Microsoft event. I found the book helpful and useful since I was learning PowerShell. He gives a few examples and builds from there. The book is good for those wanting to learn in my opinion. At least it was for me. I also got the Windows PowerShell in Action book by Bruce Payette. A much more comprehensive book that covers probably everything about PowerShell. To me this book is an intermediate/advanced level book. Reading different articles and such has also helped. My biggest problem is actually being able to use the commands to do things. Without using PowerShell for a while I find myself forgetting things and having to lookup how to write the command. I'm talking something beyond the basics as the more common commands I have saved to reuse whenever I need them. Art -Original Message- From: Joseph Heaton [mailto:jhea...@dfg.ca.gov] Sent: Monday, July 11, 2011 10:28 AM To: NT System Admin Issues Subject: Re: PowerShell query for AD group Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx** ** I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed suicide
RE: PowerShell query for AD group
Payette v2 is one of the two most advanced books available. I can assure you that some of the material in that book trips up PowerShell MVPs on a fairly regular basis. :-) Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com -Original Message- From: Art DeKneef [mailto:art.dekn...@cox.net] Sent: Monday, July 11, 2011 2:37 PM To: NT System Admin Issues Subject: RE: PowerShell query for AD group I got Learn PowerShell in a Month of Lunches after seeing Don at a local Microsoft event. I found the book helpful and useful since I was learning PowerShell. He gives a few examples and builds from there. The book is good for those wanting to learn in my opinion. At least it was for me. I also got the Windows PowerShell in Action book by Bruce Payette. A much more comprehensive book that covers probably everything about PowerShell. To me this book is an intermediate/advanced level book. Reading different articles and such has also helped. My biggest problem is actually being able to use the commands to do things. Without using PowerShell for a while I find myself forgetting things and having to lookup how to write the command. I'm talking something beyond the basics as the more common commands I have saved to reuse whenever I need them. Art -Original Message- From: Joseph Heaton [mailto:jhea...@dfg.ca.gov] Sent: Monday, July 11, 2011 10:28 AM To: NT System Admin Issues Subject: Re: PowerShell query for AD group Steven, Thank you immensely for these links. I am definitely going to check out the e-books, as I've been wanting to learn PS for a long time. Has anyone used Don Jones' book, Learn Windows Powershell in a Month of Lunches? Sounds like an interesting book. Just wondering if it's worth it. Steven Peck sep...@gmail.com 07/11/11 10:13 AM List of free eBooks for you. http://www.hofferle.com/archives/624 http://www.blkmtn.org/ - left hand block has some links to various resources on powershell I find useful. On Mon, Jul 11, 2011 at 9:57 AM, James Rankin kz2...@googlemail.com wrote: Aha! Cheers, I will experiment on that On 11 July 2011 17:54, Michael B. Smith mich...@smithcons.com wrote: Generally you use the select-object (alias: select) statement. ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* James Rankin [mailto:kz2...@googlemail.com] *Sent:* Monday, July 11, 2011 12:48 PM *To:* NT System Admin Issues *Subject:* Re: PowerShell query for AD group ** ** Thanks for that confirmation Another of my PowerShell noob queries again if I may be so bold..how can you skip lines of output from PowerShell like you used to be able to do with the *skip *parameter in an old *for /f *command? (Yes, I am just trying to upgrade my batch scripting skills straight to PS). FWIW I am pumping out the computers in an OU and just returning the name column, but I want to ignore the first two lines of output that are *Name * Is there a way to do this, or do I need nudging in a different direction? TIA, JRR On 11 July 2011 17:18, Steven Peck sep...@gmail.com wrote: If you have 2008 AD controllers yes. http://technet.microsoft.com/en-us/library/ee617195.aspx I have found the Quest AD cmdlets are easier to use. This may be because I have used them longer or that they have been around longer and have had features added to them. There is als the posibility to do it via [ADSI] which is why I started using the Quest cmdlets. http://technet.microsoft.com/en-us/magazine/2007.06.powershell.aspx** ** I do need to get the time to play with the MS AD cmdlets to get more familier with the logic in them. On Mon, Jul 11, 2011 at 9:09 AM, James Rankin kz2...@googlemail.com wrote: Is there a native PowerShell cmdlet for returning an AD group membership? Or do I need to get something like the Quest PowerShell extensions? -- On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ** IMPORTANT INFORMATION/DISCLAIMER * This document should be read only by those persons to whom it is addressed. If you have received this message it was obviously addressed to you and therefore you can read it, even it we didn't mean to send it to you. However, if the contents of this email make no sense whatsoever then you probably were not the intended recipient, or, alternatively, you are a mindless cretin; either way, you should immediately kill yourself and destroy your computer (not necessarily in that order). Once you have taken this action, please contact us.. no, sorry, you can't use your computer, because you just destroyed it, and possibly also committed