Category Archives: Misc Scripts

Get List of User Profile Folders (PoSH)

Published by:

The following snippet of PowerShell will collect the list of profiles active on a system from the registry and populate an array.

I remove any profile folder that does not exist, as well as any that are within the Windows folder (e.g. NetworkService, LocalSystem), but you can modify as you see fit if that doesn’t meet your needs. I use this when I need to add files, remove files, or make changes to files within a users profile.

You could just loop over C:\USERS\ subfolders and be fine 9,999/10,000 times, but this covers those circumstances where profiles have been stored elsewhere, where C: is not the drive with the profiles, or when you need to make sure you’re not modifying folders that aren’t true profiles.
Continue reading

Remove Recent Printers from Chrome Preferences File (PoSH)

Published by:

Chrome does not remove “Recent Printers” from the print option box when a user or an administrator deletes a printer from the machine. This can cause problems when a printer is removed by policy or is updated with a new print server name, but a user continues totry and print to the old server. This script will remove the printer from the PREFERENCES file. You can provide no printer list and all Recent Printers will be removed, or you can specific a specific printer.
Continue reading

Citrix – Installation Error DVCRenderingAdapter.dll Failed to Register

Published by:

I recently was troubleshooting the following error on roughly 400 systems that we were deploying the Citrix Receiver v14 to:

Citrix Receiver DVCRenderingAdapter failed to register

Image Credit Christopher Cable.

 

CustomAction +DVCRenderingAdapter.dll.827545C6_7013_4DE1_8E6C_DAEE4C57F54A returned actual error code -2147319780 (note this may not be 100% accurate if translation happened inside sandbox)MSI (s) (5C:9C) [10:08:57:789]: Product: Online Plug-in — Error 1904. Module C:\Program Files\Citrix\ICA Client\DVCRenderingAdapter.dll failed to register.  HRESULT -2147319780.  Contact your support personnel.
Error 1904. Module C:\Program Files\Citrix\ICA Client\DVCRenderingAdapter.dll failed to register.  HRESULT -2147319780.  Contact your support personnel.

 

There are a few discussion board posts online that discuss this issue and provide some helpful tips for manually fixing the issue.  Ones that helped me the most was this response by Mike Moskal on the Citrix Discussion Board.

Continue reading

PowerShell Script to Report SCCM DP Disk Space

Published by:

I wrote the following script to quickly output how much disk space my SCCM Distribution Points consumed.  If you’re not running a CAS, you’ll want to change line 21 to point to your primary.  This requires that you have the Configuration Manager console installed on the machine.

It’s not pretty but it did the trick.  I’m certainly open to suggestions in the comments.

Continue reading