Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. $UserProfiles = Get-ChildItem -path "C:Users*AppDataRoaming" | Select -Expand FullName
  2.  
  3. ForEach ($Folder in $UserProfiles) {
  4. $Source = ".File.ini"
  5. $Destination = ($Folder + "Folder")
  6. Copy-Item $Source $Destination
  7. }
  8.  
  9. PS C:Windowssystem32> Get-ChildItem -path "C:Users*AppDataRoaming" | Select -Expand FullName
  10. C:UsersUser1AppDataRoaming
  11. C:UsersUser2AppDataRoaming
  12. C:UsersUser3AppDataRoaming
  13. C:UsersAdministratorAppDataRoaming
  14. PS C:Windowssystem32>
  15.  
  16. PS C:Windowssystem32> Get-ChildItem -path "C:Users*AppDataRoaming" | Select -Expand FullName
  17. PS C:Windowssystem32>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement