From pc get-childitem from attached and accessible iphone

220612

How do we get into an iphone?

I will use something like this script below though I have not actually ran this yet. I tried to do a web searching from others that want to powershell into an iphone from a pc; but, I find nothing easy. One results comes back from 2011 where the poster was scoffed at. Not many back then had an iphone and wanted to powershell into it from a pc.

I do not have a way to test this like a -Whatif. I am not willing to try this without some assurance from others that have gone this route. I have tried:
cd ‘This PC\Apple iPhone\Internal Storage\DCIM’

Returns error:
cd : Cannot find path ‘C:\WINDOWS\system32\This PC\Apple iPhone\Internal Storage\DCIM’ because it does not exist.

I know this was odd trying it but the iphone does not show up like a drive so what to do and this was just a first test in case it was that obvious.

The script I want to build will start something like this:
Get-ChildItem -Path ‘This PC\Apple iPhone\Internal Storage\DCIM’ -Recurse -Directory -Force -ErrorAction SilentlyContinue | Select-Object FullName

On the iphone there is a folder the DCIM folder; it is a pictures folder.

What I am trying to do is roll through every folder in the DCIM folder on the iphone and compare them to the folder I created by copy and paste those same photos onto this pc.

I can set two explorer windows side by side and see any of the slightest deviations between the two locations in an instance. Or I can set the two explorer windows one on top of the other and alt-tab back and forth and really see the slightest discrepency in a heartbeat.

Because there is no microsoft native way to set the view to details on the DCIM folder or any of the folders in it I intend to do that, before I sift through 100 gb of photos.

I know this is not the way most people are going to attempt this; but, I am! You see I need to do it this way for several reasons. There are a set of files in apple called AAE and I want to make sure they get copied even though microsoft is incapable of opening them. I also want to be able to do a side by side comparison so I can experiment with adding features to this tool I am going to build. I also want to do the side by side because it will be so much easier to experiment and find out than try to return some obscure web results. I already did a mock-up of this side by side comparison, fighting to set the arrangements the same between the two locations; and, it was wonderful and very fast and I can guarantee the work 100%!

Why details view is better than icons? Loading the icons displaces the files set across a much larger page area whereas setting the view to details we can jam many more files into the same page, thus shrinking the page area, and thus the side by side becomes very effective.

I will add enhancements to this tool that set the columns of the details view to a specific arrangement. This one thing that can not be done with the other views, setting columns, is just another reason to use the details view. Specifically, I want to set the columns like:

  • Name, Date Created, Date Modified, Size, Type. No other arrangement makes since to me; yet, the microsoft software will not allow me to set this specific arrangement across the computer in one instance. I have been setting the arrangement everytime I open another folder. Again, once all the arrangement has been set properly viewing/ comparing the files/ folders becomes incredibly fast. I can create a script that would be faster but how do any of us know that the script is bullet-proof unless we can observe it on a large data-set?

O.k. I want to thank you for your time in advance. I really appreciate any pointer in the right direction.

biggil

220613

So, I go and make tests. I tried by guessing to set-location to the gauntlet of letter drives e: thru h: and no success while the iPhone was connected.

For every attempt returns error:

  • CategoryInfo: ObjectNotFound: (h:String) [Set-Location], DriveNotFoundException

Then I take a known thumb drive formated for pc and test with success
cd e:\

Why is it the pc can recognise the iphone is connected giving the new device connected jingle and expand explorer window with the drive displayed and ready to open; but, when attempting to navigate the iPhone with powershell we can not see the file system?

When connecting the iPhone there is a file system recognised but we can not navigate it until we give permission through the iPhone. With powershell there is no recognition of the iPhone file system to start with.

How do we get powershell to recognise the iPhone file system, DCF?

I think it is difficult for security reasons. I found something like this https://squadratechnologies.wordpress.com/2014/08/09/using-powershell-to-copy-data-from-your-apple-ipadiphone/
Maybe it will help you.

220613

@DejvDzi

Thanks for the reply. I am studying its content now. I will keep adding to this post as I progress.

220623

@DejvDzi

I have read through the website in the link of your reply some time ago. It is not what I am looking for.

I should have stated that I wanted to accomplish this natively and open source. My only intentions are to learn for myself rather than download a library. I only want the part where I can see the iphone is connected to the PC with powershell. I will work on viewing its content in the Windows filesystem, pretty much like we do with the GUI, after that.

I have found other resources on this matter and I am reading through those. Those other resource are referring to psdrive and psprovider. There are some mention of building your own provider which I am so new at it will be an effort.

I am not sure why you made the comment, “I think it is difficult for security reasons”
In the GUI, which I consider the domain of the mouse and then keyboard second, users do not have to jump through security hoops to see the iPhone attached to the PC. With the cli Powershell I have not been able to see the iPhone at all.

I want you to know that I typically do one thing at a time; in this case I want to use powershell to see the iPhone connected to the PC. Once I do that I will be able to move on to the next step and test how to gain access into the iPhone.

So I asked the other question in this forum:
Can powershell do whatever can be done with mouse and keyboard?

I was trying to short cut the time it is going to take to try/ test this concept, can mouse and keybord do whatever can be done in the GUI.

Right now as I see it the answer is No. I can not see the iPnone connected to the PC and so I can not even try to access it.

I really appreciate your input though; and, I thought this reply might help explain my position and concept on this in hopes someone reading this will also know better what I am trying to accomplish.

Hi,
After installing icloud or other Apple software it generates a certificate. And when you try to connect via powershell, you are not certified. But as I said - I think that might be the reason. This is my guess as, I haven’t researched it.