Problem z działaniem ShadowCopy i Windows Server Backup. chkdsk /R nie naprawił, nie dało się shrinkować partycji C:\ . Pomogło shrinkowanie minitool partition
https://www.minitool.com/partition-manager
Problem z działaniem ShadowCopy i Windows Server Backup. chkdsk /R nie naprawił, nie dało się shrinkować partycji C:\ . Pomogło shrinkowanie minitool partition
https://www.minitool.com/partition-manager
# skasowanie plików i folderow starszych niz 30 dni $date = (Get-Date).ToString('dd_MM_yyyy') # tworzenie folderu - nie wywala bledu nawet jesli istnieje New-Item -ItemType Directory -Force -Path "E:\BACKUP_VIRTUALKI\" Get-ChildItem –Path "E:\BACKUP_VIRTUALKI" -Recurse | Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-30))} | Remove-Item -Recurse -Force New-Item -ItemType Directory -Path "E:\BACKUP_VIRTUALKI\$date" Export-VM -NAME "SERVER01" -Path "E:\BACKUP_VIRTUALKI\$date\" Export-VM -NAME "SERVER02" -Path "E:\BACKUP_VIRTUALKI\$date\" Export-VM -NAME "SERVER03" -Path "E:\BACKUP_VIRTUALKI\$date\" Export-VM -NAME "SERVER04" -Path "E:\BACKUP_VIRTUALKI\$date\"
Migracja z FRS do DFSR (pozostałość po WS 2003)
dfsrmig /setglobalstate 1 dfsrmig /getmigrationstate # poczekać aż skończy dfsrmig /setglobalstate 2 dfsrmig /getmigrationstate # poczekać aż skończy dfsrmig /setglobalstate 3 dfsrmig /getmigrationstate # poczekać aż skończy
Dzięki Paweł!
w32tm /config /manualpeerlist:0.pl.pool.ntp.org /syncfromflags:manual /reliable:yes /update
w32tm /config /syncfromflags:domhier /update
#ustawienie max wieku komputerów:
$then = (Get-Date).AddDays(-90)
#Wylistowanie tych komputerów, które nie logowały się ostatnio:
Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | FT Name,lastLogonDate
#Wyłączenie kont nieaktywnych komputerów:
Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | Set-ADComputer -Enabled $false
#Usunięcie nieaktywnych komputerów:
Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | Remove-ADComputer
Może się przyda
Udało mi się obejść, prymitywnie, ale udało się, ograniczenie powershella
Mianowicie to: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters
Zamiast: Remove-Item na końcu robię Move-Item do innego folderu i nie wywala błędu długich nazw
A poleceniem dosowe rmdir nie ma problemu z kasowaniem długich ścieżek, plików
[sourcecode language=”powershell”]
Cmd /C "mkdir R:\DO_SKASOWANIA"
Get-ChildItem -Path "R:\BACKUP" | Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-5)} | Move-Item -Destination "R:\DO_SKASOWANIA"
Cmd /C "rmdir /S /Q R:\DO_SKASOWANIA"[/sourcecode]
Outlook – potencjalnie niebezpieczny załącznik: mdb; bat; reg lub inne rozszerzenia.
Microsoft Office Outlook 2010:
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security
Microsoft Office Outlook 2007:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security
Microsoft Office Outlook 2003:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
Microsoft Outlook 2002:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security
Microsoft Outlook 2000:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Security]
„OutlookSecureTempFolder”=”C:\\Users\\admin\\AppData\\Local\\Microsoft\\Windows\\Temporary Internet Files\\Content.Outlook\\F1425PCN\\”
„level1remove”=”mdb; bat; reg; vbs;”
Dodanie routingu na interfejs w Windows 7:
route print
=======================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 10 a4 8b 4b 8e ...... Intel(R) PRO/100+ MiniPCI - Packet Scheduler Miniport
0x4 ...44 45 53 54 42 00 ...... Nortel IPSECSHM Adapter - Packet Scheduler Miniport
0x20003 ...00 04 5a 0c 96 db ...... Instant Wireless - Network PC CARD #2 - Packet Scheduler Miniport
=======================================================================
route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.1 metric 1 if 0x20003
Źródło: http://windowsitpro.com/networking/q-when-i-add-static-ip-route-what-value-do-i-use-interface
C:\Windows\System32>net file | find /i "user"
C:\Windows\System32>net session | find /i "user" \\177.25.239.167 user 0 00:00:15
C:\Windows\System32>net session \\177.25.239.167 /DELETE The session from 197.215.189.1322 has open files.
Do you want to continue this operation? (Y/N) [N]: Y The command completed successfully.