itunes section isn't working, commented out
This commit is contained in:
+38
-38
@@ -129,48 +129,48 @@ ForEach ( $userProfile in $(EnumUserProfiles) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Apple iTunes data
|
# Apple iTunes data
|
||||||
If (-not (IsRunning -Name 'itunes') ) {
|
# If (-not (IsRunning -Name 'itunes') ) {
|
||||||
|
|
||||||
# Remove Apple software updates downloaded from iTunes
|
# # Remove Apple software updates downloaded from iTunes
|
||||||
$IPSWBasePath = "${userProfile}\AppData\Roaming\Apple Computer\iTunes"
|
# $IPSWBasePath = "${userProfile}\AppData\Roaming\Apple Computer\iTunes"
|
||||||
$IPSW = @()
|
# $IPSW = @()
|
||||||
# iPhone update files
|
# # iPhone update files
|
||||||
ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPhone Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
# ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPhone Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
||||||
$IPSW += ,@($updateFile.FullName)
|
# $IPSW += ,@($updateFile.FullName)
|
||||||
}
|
# }
|
||||||
# iPad update files
|
# # iPad update files
|
||||||
ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPad Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
# ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPad Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
||||||
$IPSW += ,@($updateFile.FullName)
|
# $IPSW += ,@($updateFile.FullName)
|
||||||
}
|
# }
|
||||||
# iPod update files
|
# # iPod update files
|
||||||
ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPod Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
# ForEach ( $updateFile in $(Get-ChildItem -Path "${IPSWBasePath}\iPod Software Updates\*" -File -Include '*.ipsw' -ErrorAction SilentlyContinue) ) {
|
||||||
$IPSW += ,@($updateFile.FullName)
|
# $IPSW += ,@($updateFile.FullName)
|
||||||
}
|
# }
|
||||||
|
|
||||||
# Remove Apple mobile applications downloaded from iTunes
|
# # Remove Apple mobile applications downloaded from iTunes
|
||||||
$IPA = @()
|
# $IPA = @()
|
||||||
ForEach ( $mobileApp in $(Get-ChildItem -Path "${userProfile}\Music\iTunes\iTunes Media\Mobile Applications\*" -File -Include '*.ipa' -ErrorAction SilentlyContinue) ) {
|
# ForEach ( $mobileApp in $(Get-ChildItem -Path "${userProfile}\Music\iTunes\iTunes Media\Mobile Applications\*" -File -Include '*.ipa' -ErrorAction SilentlyContinue) ) {
|
||||||
$IPA += ,@($updateFile.FullName)
|
# $IPA += ,@($updateFile.FullName)
|
||||||
}
|
# }
|
||||||
|
|
||||||
If ( $IPSW ) {
|
# If ( $IPSW ) {
|
||||||
LogMsg "Found Apple software update files"
|
# LogMsg "Found Apple software update files"
|
||||||
ForEach ( $path in $IPSW ) {
|
# ForEach ( $path in $IPSW ) {
|
||||||
LogMsg " - Deleting: ""${path}"""
|
# LogMsg " - Deleting: ""${path}"""
|
||||||
Try { Remove-Item -Path $path -Force -ErrorAction SilentlyContinue }
|
# Try { Remove-Item -Path $path -Force -ErrorAction SilentlyContinue }
|
||||||
Catch { LogErr $_.Exception.Message }
|
# Catch { LogErr $_.Exception.Message }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
If ( $IPA ) {
|
# If ( $IPA ) {
|
||||||
LogMsg "Found Apple mobile application files"
|
# LogMsg "Found Apple mobile application files"
|
||||||
ForEach ( $path in $IPA ) {
|
# ForEach ( $path in $IPA ) {
|
||||||
LogMsg " - Deleting: ""${path}"""
|
# LogMsg " - Deleting: ""${path}"""
|
||||||
Try { Remove-Item -Path $path -Force -ErrorAction SilentlyContinue }
|
# Try { Remove-Item -Path $path -Force -ErrorAction SilentlyContinue }
|
||||||
Catch { LogErr $_.Exception.Message }
|
# Catch { LogErr $_.Exception.Message }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
# Remove old downloaded application files
|
# Remove old downloaded application files
|
||||||
$OldDownloadedApps = (Get-ChildItem -Path "${userProfile}\Downloads\*" -File -Filter '*.exe' -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt ((Get-Date) - $TimeDelta) })
|
$OldDownloadedApps = (Get-ChildItem -Path "${userProfile}\Downloads\*" -File -Filter '*.exe' -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt ((Get-Date) - $TimeDelta) })
|
||||||
|
|||||||
Reference in New Issue
Block a user