| Topic |
 |
RE: Where is the activedirectory module??? Server 2008 or Server 2008 R2? You must have Server 2008 R2 for the AD module. by Marco Shaw in Active Directory on 06 Mar 2012 03:45 AM
|
 |
RE: powershell profile & modules Yes, you are correct that remoting needs to have the cmdlets on the remote end. I replied too quickly without giving it enough thought. It does bring up an interesting test I may try some day: remote to an endpoint, and then remote back again from ... by Marco Shaw in General PowerShell on 04 Mar 2012 08:49 AM
|
 |
RE: Best way to learn Don Jones has done a lot of teaching: http://powershellbooks.com/ The current best advanced book is probably: http://manning.com/payette2/ by Marco Shaw in Books, Tools, and Videos on 04 Mar 2012 08:44 AM
|
 |
RE: powershell profile & modules If you can't install this software elsewhere, then you may be able to use a trick like making sure to mount your local drives in remote RDP sessions, then you would still have to have a profile on the remote server that is able to use those mounted ... by Marco Shaw in General PowerShell on 03 Mar 2012 10:15 AM
|
 |
RE: Best way to learn No, I don't know what else we can offer... by Marco Shaw in Books, Tools, and Videos on 03 Mar 2012 10:11 AM
|
 |
RE: format-list ---> gridview You simply cannot pipe format-table to out-gridivew, do this instead: $certs = dir cert:\CurrentUser\Root $certs | Out-Gridview or $certs = dir cert:\CurrentUser\Root|Select-Object * $certs | Out-Gridview by Marco Shaw in General PowerShell on 03 Mar 2012 10:09 AM
|
 |
RE: Catching PathTooLongException Yes, I never noticed that behaviour... How about removing the trap completely, and just going with: Get-ChildItem \\server\share -Recurse -ErrorVariable err $err[0], etc. will contain information on each error. by Marco Shaw in General PowerShell on 26 Feb 2012 01:15 PM
|
 |
RE: .Net Framework class There's some info here: http://archive.msdn.microsoft.com/psoutlooklive/Release/ProjectReleases.aspx?ReleaseId=4513 by Marco Shaw in Exchange Server on 25 Feb 2012 04:01 PM
|
 |
RE: Catching PathTooLongException Try changing to this: Get-ChildItem \\server\share -Recurse -ErrorAction Stop If the error is non-terminating, a try/catch won't see it. The above forces all errors to be terminating, so try/catch can work. by Marco Shaw in General PowerShell on 25 Feb 2012 03:37 PM
|
 |
RE: Creating Excel file, without having Excel installed Well... Look at that... Updated for 2.0: http://powertools.codeplex.com/ Still, you need to load stuff to use this... If your org is into PowerShell remoting, you might be able to use a proxy module to import from another server without a lo ... by Marco Shaw in General PowerShell on 24 Feb 2012 06:59 AM
|
 |
RE: Creating Excel file, without having Excel installed Well, you can, but you'd have a long road ahead of you. If you can't install anything, then likely, you can't install this either: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124 That's an SDK that you could load and us ... by Marco Shaw in General PowerShell on 24 Feb 2012 06:43 AM
|
 |
RE: Test-UserCredential Works if I change: Test-UserCredential -username admin -password (read-host -assecurestring) To: Test-UserCredential -username admin -password (read-host) Might need to check the MSDN class information to see if that should be a string or se ... by Marco Shaw in General PowerShell on 23 Feb 2012 04:52 PM
|
 |
RE: Exchange 2010 powerpack http://www.powergui.org is the best place for PowerGUI support. For Exchange 2010, you need to install the Exchange 2010 management tools on the system where you are trying to run this PowerPack. by Marco Shaw in Exchange Server on 21 Feb 2012 07:29 AM
|
 |
RE: code works interactive but not from PS1 script? If you've described exactly what you're doing, this does appear strange. Check out the help for start-transcript, and add "start-transcript" to the beginning of your script and "stop-transcript" to the end to see if anything is captured. by Marco Shaw in General PowerShell on 21 Feb 2012 07:22 AM
|
 |
RE: Converting CSV into HTML table Sorry, I don't follow... by Marco Shaw in General PowerShell on 20 Feb 2012 04:31 PM
|
 |
RE: Export-Mailbox using DisplayName as pst name To be honest, I'm surprised it works because that, AFAIK, is not even valid syntax for ForEach-Object... by Marco Shaw in Exchange Server on 20 Feb 2012 01:26 PM
|
 |
RE: Getting the First result in a table Change this: Sort-Object mailboxdbsizeinGB | To this: Sort-Object mailboxdbsizeinGB | Select -first 1 | by Marco Shaw in Exchange Server on 20 Feb 2012 07:41 AM
|
 |
RE: Export-Mailbox using DisplayName as pst name You can't export as the display name. I don't have a lab up right now, but this might work: Get-Mailbox -OrganizationalUnit "domain/ou" | foreach { Export-Mailbox -PSTFolderPath V:\ -Confirm:$False move-item ("V:\" + $_.samaccountname + ".ps ... by Marco Shaw in Exchange Server on 19 Feb 2012 04:40 PM
|
 |
RE: run all *.ps1 scripts in a folder with one POWERSHELL command Try something simpler, like: Get-ChildItem -filter *.ps1 | foreach {& $_.fullname} by Marco Shaw in General PowerShell on 19 Feb 2012 04:33 PM
|
 |
RE: Converting CSV into HTML table There isn't a header row in your file.csv, so you have to do something like: PS> import-csv data.csv -header col1,col2,col3|convertto-html by Marco Shaw in General PowerShell on 19 Feb 2012 04:24 PM
|
 |
RE: Trap scope I'd have to see your code with the global in it to comment on that. The "script" scope is defined here: PS> help about_scopes The global scope is "bigger" than the script scope. The script scope only lives as long as the script is being run. by Marco Shaw in General PowerShell on 15 Feb 2012 09:02 AM
|
 |
RE: Trap scope Change just the last part: trap { $script:objs += Add-ToObjectArray $_ write-host "In trap count $($script:objs.Count)" } throw throw throw throw throw throw write-host "out trap count $($script:objs.Count)" by Marco Shaw in General PowerShell on 15 Feb 2012 07:36 AM
|
 |
RE: Trap scope You'll have to provide more info/code. Consider: http://powershell.com/cs/blogs/tobias/archive/2008/09/29/trapping-errors.aspx by Marco Shaw in General PowerShell on 14 Feb 2012 07:27 AM
|
 |
RE: Changing PSSnapin Version That is compiled in the snapin. You can't change it. by Marco Shaw in Exchange Server on 13 Feb 2012 02:42 PM
|
 |
RE: Configuring profile for ./ scripting If I follow, you would update your path environment variable. http://softwaresalariman.blogspot.com/2008/01/add-path-environment-variable-in.html by Marco Shaw in General PowerShell on 13 Feb 2012 01:43 PM
|
 |
RE: Audit policy and resolve-path 1. Looks like resolve-path does not work files that are hidden such as these uninstall directories. I'd recommend you look at some other solution, unless you want to change the hidden and read-only properties of all of these folders. Might not be ... by Marco Shaw in General PowerShell on 11 Feb 2012 03:53 AM
|
 |
RE: need some help with scripting 1. You could be passing the wrong information. 2. You could have something client-side that is blocking PowerShell.exe from sending email. 3. Your SMTP server may not be configured for what you're trying to do. There could be others... by Marco Shaw in General PowerShell on 10 Feb 2012 01:51 PM
|
 |
RE: need some help with scripting $file=get-childitem some_dir|sort -descending lastwritetime|select -first 1 $file.fullname by Marco Shaw in General PowerShell on 10 Feb 2012 11:38 AM
|
 |
RE: need some help with scripting Are you using PowerShell v2? It has a Send-MailMessage cmdlet to make this a bit easier. You'll need to provide more information on how you will be invoking this script and how the script will determine the file to attach? Do you already have s ... by Marco Shaw in General PowerShell on 10 Feb 2012 11:08 AM
|
 |
RE: need some help with scripting If that is your actual user and pass, please edit this post immediately, and reset your password. by Marco Shaw in General PowerShell on 10 Feb 2012 11:01 AM
|