Search found 13684 matches

by jvierra
Wed Aug 07, 2019 5:41 am
Forum: PowerShell GUIs
Topic: Formatting cells of a DataGridView best place for the code?
Replies: 12
Views: 371

Re: Formatting cells of a DataGridView best place for the code?

Use the cells "formatting" event to change cells color. $datagridview1_CellFormatting=[System.Windows.Forms.DataGridViewCellFormattingEventHandler]{ #Event Argument: $_ = [System.Windows.Forms.DataGridViewCellFormattingEventArgs] if($_.Value -eq 0){ $_.CellStyle.BackColor = 'Red' $_.CellStyle.ForeCo...
by jvierra
Tue Aug 06, 2019 3:21 pm
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

You can also put your csv on a web server and download it with the WebClient.
by jvierra
Tue Aug 06, 2019 3:03 pm
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

So share the storage. If your domain is hybrid then just create a share.

Scripting is not the solution.
by jvierra
Tue Aug 06, 2019 12:34 pm
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

What you want is to use SharePoint and create a shared drive that all systems are mapped to. Now you can distribute all manner of files and not have to use any APIs to do this. "Graph" is intended for other things and not just simple file sharing. First configure your SharePoint to share files. Then...
by jvierra
Tue Aug 06, 2019 11:14 am
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

OneDrive is just a local drive. Just use it as a local folder.

Get-ChildItem $env:userprofile\OneDrive

You can use all PS CmdLets to access any file on OneDrive.
by jvierra
Tue Aug 06, 2019 10:56 am
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

You can also use the OneDrive CmdLets to access and manage OneDrive:

https://www.powershellgallery.com/packa ... rive/1.1.3
by jvierra
Tue Aug 06, 2019 9:52 am
Forum: Windows PowerShell
Topic: OneDrive and PowerShell
Replies: 11
Views: 671

Re: OneDrive and PowerShell

Just copy the file to your OneDrive. There is no trick, just use "copy-item".
by jvierra
Tue Aug 06, 2019 4:05 am
Forum: PowerShell GUIs
Topic: Send a file to Powershell Studio exe (form): show name and extension
Replies: 9
Views: 234

Re: Send a file to Powershell Studio exe (form): show name and extension

When you open a file that way the file name is passed as $args[0] or as the first "Param".
by jvierra
Mon Aug 05, 2019 10:00 am
Forum: PowerShell GUIs
Topic: Send a file to Powershell Studio exe (form): show name and extension
Replies: 9
Views: 234

Re: Send a file to Powershell Studio exe (form): show name and extension

No idea what you are trying to ask.

To get a file into a variable use:

$myvar = Get-Content ExampleFile.XMind