czwartek, 29 stycznia 2015
Jak usunąć duplikat w Excelu?
- Do filtrowania w celu znalezienia wartości unikatowych służy polecenie Zaawansowane w grupie Sortowanie i filtrowanie na karcie Dane.
- Do usuwania wartości zduplikowanych służy polecenie Usuń duplikaty w grupie Narzędzia danych na karcie Dane.
- Do zaznaczania wartości unikatowych lub zduplikowanych służy polecenie Formatowanie warunkowe w grupie Styl na karcie Narzędzia główne.
- Do usuwania wartości zduplikowanych służy polecenie Usuń duplikaty w grupie Narzędzia danych na karcie Dane.
- Do zaznaczania wartości unikatowych lub zduplikowanych służy polecenie Formatowanie warunkowe w grupie Styl na karcie Narzędzia główne.
czwartek, 22 stycznia 2015
Sprawdzamy czy wszystkie serwery w sieci są dostępne
cls
Write-Host
Write-Host "Checking if PowerShell module for Active Directory is available on this machine..."
$ADModuleAvailable = $null
$ADModuleAvailable = Get-Module -ListAvailable | where {$_.Name -eq "ActiveDirectory"}
if ($ADModuleAvailable -eq $null){
Write-Host -ForegroundColor Red "PowerShell module for Active Directory is not available on this machine."
Write-Host -ForegroundColor Red "Please run this script on a domain controller or on a machine that has Active Directory management tools installed."
Write-Host
Exit}
else{
Write-Host -ForegroundColor Green "PowerShell module for Active Directory is availble."}
Write-Host
Write-Host "Checking if PowerShell module for Active Directory is already loaded..."
$ADModuleLoaded = $null
$ADModuleLoaded = Get-Module | where {$_.Name -eq "ActiveDirectory"}
if ($ADModuleLoaded -eq $null){
Write-Host "Loading PowerShell module for Active Directory ..."
Import-Module -Name "ActiveDirectory"}
Write-Host -ForegroundColor Green "Powershell module for Active Directory is loaded."
Write-Host
$ServerList = $null
$ServerList = Get-ADComputer -Filter '(OperatingSystem -like "*Server*") -AND (Enabled -ne "False")' -Properties DNSHostName | Select-Object DNSHostName | Sort-Object DNSHostName
$IsOnline = $null
ForEach ($Server in $ServerList) {
$IsOnline = Test-Connection -ComputerName $Server.DNSHostName -BufferSize 10 -Count 1 -Quiet
if ($IsOnline -eq $true){
Write-Host -ForegroundColor Green $Server.DNSHostName "is ONLINE"
}
else {
Write-Host -ForegroundColor Red $Server.DNSHostName "is OFFLINE"
}
}
żródło
Write-Host
Write-Host "Checking if PowerShell module for Active Directory is available on this machine..."
$ADModuleAvailable = $null
$ADModuleAvailable = Get-Module -ListAvailable | where {$_.Name -eq "ActiveDirectory"}
if ($ADModuleAvailable -eq $null){
Write-Host -ForegroundColor Red "PowerShell module for Active Directory is not available on this machine."
Write-Host -ForegroundColor Red "Please run this script on a domain controller or on a machine that has Active Directory management tools installed."
Write-Host
Exit}
else{
Write-Host -ForegroundColor Green "PowerShell module for Active Directory is availble."}
Write-Host
Write-Host "Checking if PowerShell module for Active Directory is already loaded..."
$ADModuleLoaded = $null
$ADModuleLoaded = Get-Module | where {$_.Name -eq "ActiveDirectory"}
if ($ADModuleLoaded -eq $null){
Write-Host "Loading PowerShell module for Active Directory ..."
Import-Module -Name "ActiveDirectory"}
Write-Host -ForegroundColor Green "Powershell module for Active Directory is loaded."
Write-Host
$ServerList = $null
$ServerList = Get-ADComputer -Filter '(OperatingSystem -like "*Server*") -AND (Enabled -ne "False")' -Properties DNSHostName | Select-Object DNSHostName | Sort-Object DNSHostName
$IsOnline = $null
ForEach ($Server in $ServerList) {
$IsOnline = Test-Connection -ComputerName $Server.DNSHostName -BufferSize 10 -Count 1 -Quiet
if ($IsOnline -eq $true){
Write-Host -ForegroundColor Green $Server.DNSHostName "is ONLINE"
}
else {
Write-Host -ForegroundColor Red $Server.DNSHostName "is OFFLINE"
}
}
żródło
Error 0x800700DE
Microsoft podaję że przyczyną jest zbyt długa nazwa pliku ( http://support.microsoft.com/kb/894630) u mnie jednak wystarczyło usunięcie kropki na końcu nazwy pliku użytkownika.
środa, 21 stycznia 2015
Zmiana pliku hosts na kilku komputerach - powershell
Set-ExecutionPolicy Unrestricted
CLS
Import-CSV "d:\Servers.csv" | % {
$Server = $_.ServerName
$adminpath = Test-Path "\\$Server\admin$"
If ($adminpath -eq "True")
{
$hostfile = "\\$Server\c$\Windows\System32\drivers\etc\hosts"
Write-Host –NoNewLine "Updating $Server..."
" 192.168.1.1 mojwpis1" | Out-File $hostfile -encoding ASCII -append
" 192.168.1.1 mojwpis2" | Out-File $hostfile -encoding ASCII -append
Write-Host "Done!"
}
Else
{
Write-Host -Fore Red "Can't Access $Server"
}
}
Plik ServersName:
ServerName
Server1
Server2
CLS
Import-CSV "d:\Servers.csv" | % {
$Server = $_.ServerName
$adminpath = Test-Path "\\$Server\admin$"
If ($adminpath -eq "True")
{
$hostfile = "\\$Server\c$\Windows\System32\drivers\etc\hosts"
Write-Host –NoNewLine "Updating $Server..."
" 192.168.1.1 mojwpis1" | Out-File $hostfile -encoding ASCII -append
" 192.168.1.1 mojwpis2" | Out-File $hostfile -encoding ASCII -append
Write-Host "Done!"
}
Else
{
Write-Host -Fore Red "Can't Access $Server"
}
}
Plik ServersName:
ServerName
Server1
Server2
IPhone nie uruchamia się - czarny ekran!
W IPhone 4S pomogło jednoczesne wciśnięcie przycisku Usypianie/Budzenie oraz przycisku Początek i przytrzymanie ich przez 10 sekund, aż zostało wyświetlone logo firmy Apple.
Subskrybuj:
Posty (Atom)

