Matt Bloomfield

Forum Replies Created

Viewing 15 posts - 376 through 390 (of 429 total)
  • Author
    Posts
  • in reply to: change ad account password without ad module #32467
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Another option would be to go old school and use NET USER

    in reply to: beginner copy #32320
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Do you have read permissions on the file in its new location? Can you browse to it and open it in notepad?

    in reply to: Start-Process "Positional parameter cannot be found" error… #32302
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Start-Process -Credential ($credentials) -FilePath “\\server1\msi\New_Machine\$Greenshot” /ArgumentList “$GreenshotArgList”

    Use -ArgumentList instead of /ArgumentList.

    in reply to: beginner copy #32292
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Forgive me, I’m not going to tell you how to do it.

    What I will do is show you how you can find out how to do it. PowerShell has a powerful help system which allows you to discover commands (which PowerShell calls cmdlets) and how to use them. A good starting point for you would be the command

    This will search the help files for all references to ‘copy’. From those results, you should be able to work out which command you can use to copy items (that’s a hint!) from one location to another. PowerShell provides examples of how to use the commands and you can see those with

    Let us know how you get on.

    in reply to: Outputting to TXT problem #32249
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Codeweavers is nearly there but you need to be outputting the data to the file at the end of each iteration of the foreach loop.

    in reply to: Automate windows operations to run when an F key is pressed #32176
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    I’m afraid it’s not a PowerShell solution but have a look at AutoHotKey.

    in reply to: Events #32064
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    Event locations are listed on the Eventbrite Page.

    The organiser posted his e-mail address in this article announcing the event if you need to make direct contact.

    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    You can still use Curtis’s solution, but instead of replacing the colon and space with nothing replace it with a tab, using `t. e.g. to add two tabs.

    in reply to: Extracting "color representation" property in of an image #31705
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    From my testing that error was generated when the script attempts to process a file that is not an image. You will need to add code to skip files that are not supported. A list of supported images types can be found here:
    https://msdn.microsoft.com/en-us/library/at62haz6(v=vs.110).aspx

    in reply to: Extracting "color representation" property in of an image #31664
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    I just tested it with PS2EXE from the TechNet Gallery and you’re right, you will need to add

    Place it at the top of the function declaration after

    Also, a minor thing, in the please wait message ‘untill’ should only have one ‘l’ 🙂

    in reply to: Extracting "color representation" property in of an image #31650
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    What are you using to turn the PowerShell code into an exe?

    in reply to: Moving user data #31639
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    I would use Robocopy. You’re almost certainly going to want to be using its wait and retry switches and its logging functionality for this type of migration. The /COPYALL switch will allow you to retain security and timestamps and attributes..

    Where is the $? Is it a) \\oldserver\home$\ or b) \\oldserver\home\$?

    If it’s a) then robocopy \\oldserver\home$\ \\newserver\home /e /copyall will rename on the fly.

    If it’s b) it’s a little trickier. I’d be inclined to do something like:

    By the way, are you sure you want to remove the $? It’s used to hide the folder(s) – this is generally a good thing for home folders.

    in reply to: Extracting "color representation" property in of an image #31603
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    I think I’ve got it working. In Code 1, after the line

    Add the following:

    I had to add the try/catch because an exception was generated if the file did not have that property set. I would recommend additional error handling to skip files that are not images, these generated an out of memory exception when I tested the script.

    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    I need a cold beer.

    The hard work has been done for you. Google threw up this:
    TechNet Blog – Checking and Enabling Remote Desktop With PowerShell.

    The same registry keys are using in Windows 7, I believe.

    Not quite sure what you mean by ‘for select users’; this is a per machine setting. Remote access can be restricted to specific users by restricting membership of the local security groups. e.g. Members of Local Administrators will be able to connect and so will members of Remote Desktop Users.

    in reply to: PowerShell using iTextSharp to combine PDF files #30768
    Participant
    Topics: 4
    Replies: 429
    Points: 769
    Helping Hand
    Rank: Major Contributor

    This isn’t really a PowerShell question, I think you’ll have better luck in an iTextSharp forum. It looks like stackoverflow has an active iTextSharp community.

Viewing 15 posts - 376 through 390 (of 429 total)