Search found 13003 matches

by jvierra
Fri Jan 11, 2019 2:25 pm
Forum: Windows PowerShell
Topic: PowerShell writing to console out of order
Replies: 12
Views: 416

Re: PowerShell writing to console out of order

Please attach your script to your post. The "Full Editor" has a place to attach scripts. When using Write-Host to output lines to the console the output is independent of the pipeline and, most of the time, will come out before pipeline output. See the main PowerShell documentation for more informat...
by jvierra
Fri Jan 11, 2019 3:09 am
Forum: PowerShell GUIs
Topic: Change picture with a Buttonclick
Replies: 4
Views: 254

Re: Change picture with a Buttonclick

I don't understand what you are asking. The code above opens an image file into a PictureBox control. You have two methods to do this. One is to copy the files into the project and distribute the files with the project and two is to add the images to an ImageList control at design time and they will...
by jvierra
Thu Jan 10, 2019 10:41 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

Sorry typo - $OUList = @( 'OU=Workstations,OU=Testing,DC=Domain,DC=com', 'OU=Desktops,DC=Domain,DC=com', 'OU=Laptops,DC=Domain,DC=com' ) $computers = $OUList | ForEach-Object{ Get-ADComputer -Properties Name -Filter { Enabled -eq $True -and OperatingSystem -like "*Windows*" } -SearchBase $_ | Where-...
by jvierra
Thu Jan 10, 2019 10:04 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

This would be easier to work with and debug. $OUList = @( 'OU=Workstations,OU=Testing,DC=Domain,DC=com', 'OU=Desktops,DC=Domain,DC=com', 'OU=Laptops,DC=Domain,DC=com' ) $computers = ForEach-Object{ Get-ADComputer -Properties Name -Filter { Enabled -eq $True -and OperatingSystem -like "*Windows*" } -...
by jvierra
Thu Jan 10, 2019 9:53 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

An array declaration requires commas.

[$OUList = @(
'OU=Workstations,OU=Testing,DC=Domain,DC=com',
'OU=Desktops,DC=Domain,DC=com',
'OU=Laptops,DC=Domain,DC=com'
)
by jvierra
Thu Jan 10, 2019 6:49 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

What VS code? This is a script. Run it in PowerShell. I ran the code from the Gallery. It is a Jaap Brasser script. His scripts are very good always. It works fine for me. I suspect you changed the code somehow and now it is not working. Have you run it locally? Just type the name of the function. I...
by jvierra
Thu Jan 10, 2019 6:18 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

You are trying to access a part of the registry that is forbidden. This is the full error line.

Get-RemoteProgram : Exception calling "OpenRemoteBaseKey" with "2" argument(s): "Attempted to perform an unauthorized
by jvierra
Thu Jan 10, 2019 5:50 pm
Forum: Windows PowerShell
Topic: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?
Replies: 12
Views: 287

Re: PowerShell script to Get-RemotePrograms and export to .CSV for multiple AD computer object not working for bulk?

Look at the error message. It tells you exactly what the issue is:

"Attempted to perform an unauthorized operation."
by jvierra
Wed Jan 09, 2019 11:19 pm
Forum: Windows PowerShell
Topic: Powershell for exporting Mailbox on Office 365 and OnPremise to each respective .CSV as the result?
Replies: 5
Views: 196

Re: Powershell for exporting Mailbox on Office 365 and OnPremise to each respective .CSV as the result?

Great. I ran across that about two years ago with another module and the O365 module. Not quite sure why but I suspect upgrading your Exchange might fix it.