Re: [NTSysADM] Set-ImageSize Help

2017-06-16 Thread Sean Martin
Ah! That's where I was confused. That did the trick, thanks again for your help! - Sean On Fri, Jun 16, 2017 at 2:47 PM, Michael B. Smith wrote: > Dot sourcing is “more-or-less” equivalent to ipmo. > > > > So you need to separate that into 2 lines. > > > >

RE: [NTSysADM] Set-ImageSize Help

2017-06-16 Thread Michael B. Smith
Dot sourcing is “more-or-less” equivalent to ipmo. So you need to separate that into 2 lines. . .\Set-ImageSize.ps1 Set-ImageSize -Image $Source -Destination $Destination -WidthPx $Width -HeightPx $Height From: listsad...@lists.myitforum.com

RE: [NTSysADM] Set-ImageSize Help

2017-06-16 Thread Joseph L. Casale
The error is not ambiguous, use full paths as ".\" means different things at different times… Or resolve paths with the location of your script, there are cmdlets and variables to help here. From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Sean Martin

Re: [NTSysADM] Set-ImageSize Help

2017-06-16 Thread Sean Martin
Commenting the line that loads system.windows.forms didn't make a difference. My script, along with set-image.ps1 are in the same directory. I use "import-module .\set-imagesize.ps1 within a try/catch block and that succeeds. The script fails at the point where it runs: set-imagesize

RE: [NTSysADM] Set-ImageSize Help

2017-06-16 Thread Michael B. Smith
One of the problems is that the script loads system.windows.forms – which is inherently interactive. However, the script doesn’t appear to use it. So… take that line out. Tell me more about your setup for “running your script”? From: listsad...@lists.myitforum.com

[NTSysADM] Set-ImageSize Help

2017-06-16 Thread Sean Martin
Good morning/afternoon, Looking for a bit of assistance. I'm writing a script to import photos into Active Directory and part of the process requires that the photos be resized, so I downloaded this gem: https://gallery.technet. microsoft.com/scriptcenter/Resize-Image-File-f6dd4a56 Importing and

[NTSysADM] TIL: Interesting PowerShell item regarding CIM and WMI CMDLets

2017-06-16 Thread Christopher Bodnar
OK, so I had some extra time on my hands today, and as an exercise for myself decided to see if I could come up with a PowerShell one-liner that would list out process name, and owner. Found a few things that I was surprised about and wanted to pass on in case it saves someone else some time.