I put together the following script to help a small group configure Microsoft Access during login in a kiosk environment. You’re welcome to steal and modify as you see fit. For all the options you can possibly set, see this MSDN page (ignore the comment that it’s for Visual Basic…)
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.
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.
I recently was troubleshooting the following error on roughly 400 systems that we were deploying the Citrix Receiver v14 to:
Image Credit Christopher Cable.
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.
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.