-
I found this vbs script to refresh the current user profile so you can see the change immediately. what would be the powershell equivalent Set oShell = CreateObject("WScript.Shell") Set oSHApp = CreateObject("Shell.Application") Set oFSO = CreateObject("Scripting.FileSystemObject") 'Set Wallpaper to Path Below sWinDir = oFSO.GetSpecialFolder(0) sWallPaper = "C:\WINDOWS\DOMXP.bmp" ' Update Wallpaper in registry oShell.RegWrite "HKCU\Control Panel
-
The wallpaper was just an example. I want to be able to refresh the user's running profile so that changes made via the registry, such as with the Environment Variable PATH, can be applied to the user's running profile without logging off and back on. So that it can be used for scripted program installations which will make Environment Variable changes via registry key value additions within HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. Idk if that makes a little more
-
Thank you
-
I have a script Get-QadGroup -SearchRoot 'test.com/Master/Groups/Groups - Secure/Soft' | Sort Name | Select Name, Description, Notes, Managedby The problem I have is I am getting the DN for Managed by. How do I make it so it just displays the name of the person who manages the group "John Doe" and not (CN= John Doe ,OU=FL,OU=Users,DC=test,DC=com) Also I would like to export this to a csv file in a table format. Thank you so much
-
I have no idea what just happened. I am sorry, maybe I should have specified that I am new to programming and powershell? I dont want to bother you but giving me an example using something practical would help? like using the example I used? So sorry to bug you with such simple stuff (for you)
-
Thank you. I found another solution to the problem :). I just used <style> and assigned it specific attributes for my table and assigned that to a varriable $a and used ConvertTo-Html -$a
-
Hey Don so I have this powershell scriptthat displays all the users and their office and sorts by office $result = Get-Qaduser -SearchRoot 'test.com/Master/Users' | Sort Office | Format-Table Name,Office -Auto | Out-String $emailBody = $result I email these results to myself. Problem with that is when I get the email the formatting is lost and they arent in the form of a table anymore, just rows and rows of lines of names and office locations. Want Can i do to keep the formatting when I receive