Advertisement
Guest User

Untitled

a guest
Mar 1st, 2019
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #
  2. # connect to archive disk
  3. #
  4.  
  5. $username = 'archive'
  6. $password = ConvertTo-SecureString 'qpJvMZwivnLAuQSuD9v2EwKBwTyVoHP51uc8qkOR6QZTM1eUJNb7Q2tViun7QIpFp4v3iHfEn9JM6mJbu+QvfQ==' -AsPlainText -Force
  7. $cred = new-object -typename System.Management.Automation.PSCredential `
  8. -argumentlist $username, $password
  9.  
  10. $loc = '\\archive.file.core.windows.net\archive'
  11. new-psdrive -Name archive -PSProvider FileSystem -Root $loc -Credential $cred
  12.  
  13.  
  14. # move the packed files to new location - disabled due to network traffic (too high)
  15. <#
  16. ls archive:\
  17. cd archive:\packed
  18. #copy-item K:\Base\Media\collect\lala.txt archive:\packed
  19.  
  20. copy-item K:\Base\Media\packed\*.7z archive:\packed
  21. #move-item K:\Base\Media\packed\*.7z archive:\packed
  22.  
  23. (Get-History)[-1].EndExecutionTime - (Get-History)[-1].StartExecutionTime
  24. remove-psdrive archive
  25. get-psdrive
  26. #>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement