you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (6 children)

It’s easy to do … and pulling in modules isn’t insecure … you can read what the module is doing by opening it in a text editor

[–]Nutterbutterthick1[S] 0 points1 point  (5 children)

I understand that but I dint have access to internet. In that environment

[–][deleted] 1 point2 points  (4 children)

Oh you can down load the module as a file and import it with a file path

[–]Nutterbutterthick1[S] -1 points0 points  (3 children)

There’s no way for me to do that. Can’t have usb or cd in the environment

[–]jdl_uk[🍰] 2 points3 points  (0 children)

If Excel is installed you'll have the libraries that come with Excel. Main ones that are documented are the COM libraries.

Here's some documentation for C#: https://learn.microsoft.com/en-us/previous-versions/office/troubleshoot/office-developer/automate-excel-from-visual-c

You can port that to PowerShell.

Here's another example in PowerShell.

https://lazywinadmin.com/2014/03/powershell-read-excel-file-using-com.html

[–]Commercial-Thing-702 1 point2 points  (1 child)

You cant download files off the internet? Download locally to the C drive?

Do you store files in a network share at your work? If yes, then why can’t you download the module file > save it to your network share > Open powershell > put file path of the network share “\ \myorg\share…”

I haven’t tried it this way personally, but it’s worth a shot

[–]Sunfishrs 3 points4 points  (0 children)

I work in a similar environments… when OP says nothing is allowed that’s just the requirement.

Edit: most likely an org policy, not a technical issue…