Search found 188 matches

by ITEngineer
Mon Feb 04, 2019 5:20 pm
Forum: Windows PowerShell
Topic: Unable to export the result to .CSV file ?
Replies: 3
Views: 935

Unable to export the result to .CSV file ?

People, I'm trying to the list of the installed update like the below result into .CSV like running the Get-HotFix manually one by one for each server: ServerName, Last Time Update Installed, KB Number, KB Update Name, InstalledBy PRODDB01, 31/12/2018 02:46:55, KB4462930, Cumulative Update, NT AUTHO...
by ITEngineer
Tue Jan 22, 2019 5:21 pm
Forum: Windows PowerShell
Topic: Get-WmiObject : Out of memory error?
Replies: 4
Views: 1172

Re: Get-WmiObject : Out of memory error?

jvierra wrote:
Tue Jan 22, 2019 9:36 am
The first thig to do is to reboot the problem server and test again.

Get-Service uses WMI so it may also fail.
I can't reboot it now since it is Critical production server. Is there any service that I can restart?

What about using the Get-CimInstance?
by ITEngineer
Tue Jan 22, 2019 5:10 am
Forum: Windows PowerShell
Topic: Get-WmiObject : Out of memory error?
Replies: 4
Views: 1172

Re: Get-WmiObject : Out of memory error?

jvierra wrote:
Tue Jan 22, 2019 4:49 am
It appears that you have WMI issues. The scripts are correct.
So how to fix that issue or change it into Get-Service instead?
by ITEngineer
Tue Jan 22, 2019 4:23 am
Forum: Windows PowerShell
Topic: Get-WmiObject : Out of memory error?
Replies: 4
Views: 1172

Get-WmiObject : Out of memory error?

Hi All, I am trying to learn to script with WMI object & PowerShell, so I'm not sure why the simple script below does not work for the some server, but work for the other? $Server = 'PRDSQL17-VM' Get-WmiObject -ComputerName $Server -Class Win32_LogicalDisk -Filter "DriveType = 3" | ft -AutoSize Get-...
by ITEngineer
Thu Jan 10, 2019 10:09 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: 2941

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 ITEngineer
Thu Jan 10, 2019 9:38 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: 2941

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. ...
by ITEngineer
Thu Jan 10, 2019 6:37 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: 2941

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 Is there anything that I need to do? because I have already run the Visual Studio Cod...
by ITEngineer
Thu Jan 10, 2019 5:54 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: 2941

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." What does it means? But when I run the script line by line manually, it works. :shock: The below lines is also working and returns the online PC that is ping-able: $OUList = @( "OU=W...
by ITEngineer
Thu Jan 10, 2019 5:22 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: 2941

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

Here's the full script I run: Function Get-RemoteProgram { <# .Synopsis Generates a list of installed programs on a computer .DESCRIPTION This function generates a list by querying the registry and returning the installed programs of a local or remote computer. .NOTES Name : Get-RemoteProgram Author...
by ITEngineer
Thu Jan 10, 2019 5:20 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: 2941

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

Hi All, I need to export the .CSV for all computers with Microsoft Office installed, hence I've stumbled upon this script: https://gallery.technet.microsoft.com/Get-RemoteProgram-Get-list-de9fd2b4#content When I run the script using one line of code at the end of the file, it can give me the result ...