27 Aralık 2017 Çarşamba

Outlook Lync Meeting Delegate etme (alıntıdır)

Lync 2013 Delegates Pt.1 (Non Lync Enterprise Voice enabled delegation)


Lately I have seen some confusion around delegates between Exchange and Lync that I wanted to help clear up. The unknown variable seems to be whether the user needs to be enabled for Enterprise Voice within Lync to setup Exchange delegates. Exchange delegates within Lync can be setup regardless of whether or not the user is Enterprise Voice enabled but there are gotcha's that admins need to know. In this first part we will talk about Non-EV users setting up delegates and in the second part we will look at the same experience when delegating users are EV enabled.
Delegator is not EV enabled within Lync
Delegator (Manager) = User20
Delegate (Assistant) = User21
 
By default, the client user policy is not enabled for "EnableExchangeDelegateSync". So let's see what happens if we try to schedule a meeting and then add Lync details to that meeting. User20 went into Outlook, clicked File, Account Settings, and then Delegate Access. Within delegates they added User21 to delegates as an Editor of their calendar (Figure 1). Now lets add User20's calendar to User21 (Open Calendar) and click New Meeting (non-Lync). This works successfully as it should because we only created a meeting within Outlook\Exchange (Figure 2). Now what happens if we select "Lync Meeting"? You will see we get the error in Figure 3. This is due to the fact that we haven't enabled the "EnableExchangeDelegateSync" option on User20's Lync client policy.
 
Figure 1: Manager (User20) delegating access to User21
Figure 2: User21 creating a new meeting for Administrator
Figure 3: User21 trying to add Lync meeting options as User20
 
Now let's set User20's Lync client policy to EnableExchangeDelegateSync. This will enable the sync from Outlook\Exchange to Lync. Remember User20 must logout and back in to get this new policy.
1.       Set-CsClientPolicy <policy_name> –EnableExchangeDelegateSync $True
 
Now that the policy is in effect, User21 sees the message below informing them they have been added as a delegate for User20 and a new group named "People I manage Calls For" gets created with User20 as a member (Figure 4). User21 should also now be able to create Lync meetings for User 20 (Figure 5).
Figure 4: User21 added as delegate for User20
 
Figure 5: User21 can now successfully create a Lync meeting for User20
There is one thing I want to mention about this whole process before going into why this isn't the preferred method.
1.       In order for delegates to get synced from Outlook\Exchange to Lync the Outlook client must be open on the delegator's machine. The reason for this is because delegation uses MAPI only and not EWS (http://technet.microsoft.com/en-us/library/gg398806(v=ocs.14).aspx).
2.       The "You were added as a delegate for User20" banner notification will be displayed each time you login to each computer until you click the X to dismiss the notification. The notification gets written to the registry keys below (Figure 6). Once you click the X to dismiss the notification User20 will be removed from the "Outstanding DelegatorList" key and added to "Dismissed DelegatorList" so the banner is no longer displayed on this computer for that specific user.
a.       Location - HKCU\Software\Microsoft\Office\15.0\Lync\user21@fabrikam.com
b.      Last DelegatorList – current list of delegators.
c.      Outstanding DelegatorList – display the banner for users listed under this key
d.      Dismissed DelegatorList – Once User21 clicks the X next to the banner that sip uri will get moved under this key so it doesn’t display that message again on this computer.

Figure 6: Registry keys for delegation

That seemed fairly easy so why is this not the recommended method of creating delegates? The main reason is because when Lync writes the delegate list to the BE database it’s a one-time create record. This means that the record never gets removed from the BE database unless done manually. The behavior described can cause issues when User20 removes User21 from their Outlook delegate list. When that happens User21 will no longer be able to create Lync meetings for User20 but will still see the "People I manage calls for" group and still get the notifications "You were added as a delegate for User20".
In order to get rid of all the remnants of the delegation between User20 and User 21 you need to have the delegator (User20) go into their Lync Client and remove delegate (User21) from "delegates" group.
Close User20's Lync client and sign back in. You will now see the message below and the registry keys will be updated (Figure 7). At this point all the remnants are now removed.
With Part 2 we will look at the same experience if the delegating user is Lync Enterprise Voice enabled.
Thanks to Jimmy Vincent for help with this scenario!!

20 Kasım 2017 Pazartesi

Sanal Platformlarda daha Önceden eklenen aygıtları görmek için







  1. "Başlat (Start)" menüsünden "Çalıştır (Run)" seçin
  2. "cmd" yazıp Enter' a basın ve dos komut satırına gelin
  3. Komut satırında "set devmgr_show_nonpresent_devices=1" yazıp Enter' a basarak yalnızca bu windows oturumunda geçerli olacak şekilde, ortam değişkenlerini gizli ya da kullanılmayan sürücüleri de gösterecek şekilde ayarlayın
  4. Bu komudun sonrasında "devmgmt.msc" ile Aygıt Yöneticisi (Device Manager)' i açın. (Bilgisayarım simgesine sağ tıklayıp özelliklerden ulaşabileceğiniz Aygıt Yöneticisinde gizli aygıtları göremezsiniz. O yüzden komut satırından açmanız gerekiyor.)
  5. Aygıt yöneticisi konsolu geldiğinde ise Görünüm (View) menüsünden Gizli Aygıtları Göster (Show Hidden Devices) seçeneğini aktif hale getirin.


17 Kasım 2017 Cuma

Linux'da folderdaki dosyaların taşınması

Esm üzerindeki esm arşivleri "/opt/arcsight/logger/data/archives/0648518346341351424" folderının içersinde bulunmakta
burada disk alanı dolduğunda aşağıdaki gibi bir hata mesajı geliyor
Machine generated alternative text:
Fri 11117/2017 10:17 AM
arcesm@abank.com.tr
IARCSIGHTJIarcesm.abank.com.tr] Logger Archival --Event archive disk space is up to 99%
To NlicrosoftvesistemYonetimi
Action Items
EventArchive location /opt/arcsight/logger/data/archives/ has used 99% of the cap space. Please free up some cap by moving eventarchive directories to some other place.




Linux üzerinden disk alanlarını kontrol ettiğimizde %99 luk bir alan sıkıntısı görmemize rağmen bu msj alıyoruz.Bu yüzden bu alandaki folderıları taşımamız gerekecek.Taşımamız gereken alan esm server üzerinde /archive_yedek alanu komutta aşağıdaki gibi
"mv 2017* /archive_yedek"



Öncelikle  bu komutla disk alanına gidiyoruz; "cd /opt/arcsight/logger/data/archives/0648518346341351424/20170411"       daha sonra  bu komutu çalıştırıyoruz."mv 2017* /archive_yedek" 

16 Kasım 2017 Perşembe

Servisi Batch kullanarak Scedule ile restart etmek için

net stop "Service B"
net stop "Service A"
timeout /T 10
net start "Service B"
timeout /T 10
net start "Service A"

8 Kasım 2017 Çarşamba

Uzaktaki Serverlarda paylaşımları detayları ile çıkarma

Uzaktaki bir serverda paylaşımları ve detaylarını gösterir.Aşağıdaki komutu komple kopyala daha sonra düşen ekran jpegdeki gibi yap



#Requires -Version 4


function Log
{
<#
 .Synopsis
  Function to log input string to file and display it to screen

.Description
  Function to log input string to file and display it to screen. Log entries in the log file are time stamped. Function allows for displaying text to screen in different colors.

.Parameter String
  The string to be displayed to the screen and saved to the log file

.Parameter Color
  The color in which to display the input string on the screen
  Default is White
  Valid options are
    Black
    Blue
    Cyan
    DarkBlue
    DarkCyan
    DarkGray
    DarkGreen
    DarkMagenta
    DarkRed
    DarkYellow
    Gray
    Green
    Magenta
    Red
    White
    Yellow

.Parameter LogFile
  Path to the file where the input string should be saved.
  Example: c:\log.txt
  If absent, the input string will be displayed to the screen only and not saved to log file

.Example
  Log -String "Hello World" -Color Yellow -LogFile c:\log.txt
  This example displays the "Hello World" string to the console in yellow, and adds it as a new line to the file c:\log.txt
  If c:\log.txt does not exist it will be created.
  Log entries in the log file are time stamped. Sample output:
    2014.08.06 06:52:17 AM: Hello World

.Example
  Log "$((Get-Location).Path)" Cyan
  This example displays current path in Cyan, and does not log the displayed text to log file.

.Example
  "$((Get-Process | select -First 1).name) process ID is $((Get-Process | select -First 1).id)" | log -color DarkYellow
  Sample output of this example:
    "MDM process ID is 4492" in dark yellow

.Example
  log "Found",(Get-ChildItem -Path .\ -File).Count,"files in folder",(Get-Item .\).FullName Green,Yellow,Green,Cyan .\mylog.txt
  Sample output will look like:
    Found 520 files in folder D:\Sandbox - and will have the listed foreground colors

.Link

.Notes
  Function by Sam Boutros
  v1.0 - 08/06/2014
  v1.1 - 12/01/2014 - added multi-color display in the same line

#>
      
       [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')]
       Param (
             [Parameter(Mandatory = $true,
                              ValueFromPipeLine = $true,
                              ValueFromPipeLineByPropertyName = $true,
                              Position = 0)]
             [String[]]$String,
             [Parameter(Mandatory = $false,
                              Position = 1)]
             [ValidateSet("Black", "Blue", "Cyan", "DarkBlue", "DarkCyan", "DarkGray", "DarkGreen", "DarkMagenta", "DarkRed", "DarkYellow", "Gray", "Green", "Magenta", "Red", "White", "Yellow")]
             [String[]]$Color = "Green",
             [Parameter(Mandatory = $false,
                              Position = 2)]
             [String]$LogFile,
             [Parameter(Mandatory = $false,
                              Position = 3)]
             [Switch]$NoNewLine
       )
      
       if ($String.Count -gt 1)
       {
             $i = 0
             foreach ($item in $String)
             {
                    if ($Color[$i]) { $col = $Color[$i] }
                    else { $col = "White" }
                    Write-Host "$item " -ForegroundColor $col -NoNewline
                    $i++
             }
             if (-not ($NoNewLine)) { Write-Host " " }
       }
       else
       {
             if ($NoNewLine) { Write-Host $String -ForegroundColor $Color[0] -NoNewline }
             else { Write-Host $String -ForegroundColor $Color[0] }
       }
      
       if ($LogFile.Length -gt 2)
       {
             "$(Get-Date -format "yyyy.MM.dd hh:mm:ss tt"): $($String -join " ")" | Out-File -Filepath $Logfile -Append
       }
       else
       {
             Write-Verbose "Log: Missing -LogFile parameter. Will not save input string to log file.."
       }
}


function Get-FileShares
{
<#
 .SYNOPSIS
  Script to provide file share information

.DESCRIPTION
  Function to provide file share information from one or more Windows file servers.
  This is intended to run from a domain joined Windows 8.1 workstation against one or more file servers in the same domain.
  However, the source file servers can be Windows 2003 and up as long as Powershell 2.0 or up is installed, and Powershell remoting is configured.
  The function returns information including server name, share name, description, count of currently connected users, and amount of free space on the drive where the share is located.
  The function also obtains and saves the registry entries for file shares on the source server(s), and provides link(s) to file(s) location.
  Function output is displayed to screen and saved to log file.

.PARAMETER ComputerName
  One or more computer names separated by commas. These are the file servers to report on.

.PARAMETER LogFile
  Path to the file where the input string should be saved.
  Example: c:\log.txt
  If absent, the script will use a name on the target server

.PARAMETER ShowConnectedUsers
  This switch defaults to false. If set to true, the script lists all users currently connected to server shares.

.PARAMETER PassThru
  This switch defaults to false. If set to true, the script returns a PS object containing the properties listed under OUTPUTS below.

.EXAMPLE
  Get-FileShares -ComputerName MyFileServer1
  The script will return list of drives of MyFileServer1, list of file shares, their path and description, count of currently connected users to each share, share permissions on each share, then comiles all that information in one table.
  The information is displayed on the screen and saved to log file in logs subfolder.

.EXAMPLE
  $Shares = Get-FileShares -ComputerName MyFileServer1 -Passthru
  The script will return list of drives of MyFileServer1, list of file shares, their path and description, count of currently connected users to each share, share permissions on each share, then comiles all that information in one table.
  The information is displayed on the screen and saved to log file in logs subfolder.
  It also returns a PS object that's now saves in the $Shares vairable.
  $Shares | Out-Gridview # shows information in tablular format in PS ISE
  $Shares | Export-Csv .\MyFileServer1.csv -NoType # Exports information to CSV for review/edit in Excel (may not display properly - complex object).
  $Shares | Export-Clixml .\MyFileServer1.xml # Good for storing complex objects for later comparisons using Import-Clixml and Compare-Object

.EXAMPLE
  Get-FileShares -ComputerName MyFileServer1,MyFileServer2
  The script will return list of drives of listed servers, list of file shares, their path and description, count of currently connected users to each share, share permissions on each share, then comiles all that information in one table.
  The information is displayed on the screen and saved to log file in logs subfolder.

.EXAMPLE
  Get-FileShares -ComputerName MyFileServer1 -ShowConnectedUsers
  The script will return list of drives of MyFileServer1, list of file shares, their path and description, count of currently connected users to each share, share permissions on each share, then comiles all that information in one table.
  It also listed each connected user to each share, on each of the listed computers. For each connected user the script lists ShareName, UserName, (client) ComputerName (or IP address), ActiveTime (seconds).
  The information is displayed on the screen and saved to log file in logs subfolder.

.OUTPUTS
  If the PassThru switch is set to true, the script reurns a PS object with the following properties:
    ServerName 
    ShareName      
    Path           
    Description    
    ConnectedUsers 
    'DriveTotal(GB)'
    'DriveUsed(GB)'
    'DriveFree(GB)'
    'DriveFree(%)' 
    ShareUser      
    SharePerms     
    ShareAccess    

.LINK

.NOTES
  Function by Sam Boutros
  v1.0 - 02/09/2015

#>
      
       [CmdletBinding()]
       Param (
             [Parameter(Mandatory = $true, Position = 0)]
             [String[]]$ComputerName,
             [Parameter(Mandatory = $false, Position = 1)]
             [String]$LogFile = "C:\Temp\Get-FileShare_$ComputerName-$(Get-Date -format yyyy-MM-dd_hh-mm-sstt).txt",
             [Parameter(Mandatory = $false, Position = 2)]
             [Switch]$ShowConnectedUsers = $false,
             [Parameter(Mandatory = $false, Position = 3)]
             [Switch]$PassThru = $false
       )
      
       if (-not (Test-Path 'c:\Temp')) { New-Item -Path 'c:\Temp' -ItemType Directory -Force | Out-Null }
      
       foreach ($Server in $ComputerName)
       {
            
             # Attempt to open Powershell session to Source Server
             Get-PSSession | Remove-PSSession # Remove any old sessions
             try { $Session = New-PSSession -ComputerName $Server -EA 1 }
             catch
             {
                    log 'Failed to establish remote Powershell session to Source Server', $Server Magenta, Yellow $LogFile
                    break
             }
             log 'Connected to Source Server', $Server Green, Cyan $LogFile
            
            
             log 'Getting share information from source server registry' -LogFile $LogFile
             $LanMan = Invoke-Command -Session $Session -ScriptBlock {
                    if ($env:windir.IndexOf(' ') -gt 0)
                    {
                           try { New-Item -Path 'c:\Sandbox' -ItemType Directory -Force -Confirm:$false -EA 1 }
                           catch
                           {
                                  Return "Failed to create folder 'c:\Sandbox' on computer '$env:COMPUTERNAME'"
                           }
                           $Temp = 'c:\Sandbox\Shares.reg'
                    }
                    else
                    {
                           $Temp = "$env:windir\Shares.reg"
                    }
                    REG export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares $Temp /y | Out-Null
                    $Temp
             }
             $SharesReg = "\\$Server\$($LanMan.Replace(':', '$'))"
             if (Test-Path -Path $SharesReg)
             {
                    log 'Got file share information on server', $Server Green, Cyan $LogFile
                    log 'Information is saved in file', $SharesReg  Green, Cyan $LogFile
                    # & notepad $SharesReg
             }
             else { log $LanMan Magenta $LogFile; break }
            
            
             log 'Identifing file shares: drive letter, share name, size, connected users' -LogFile $LogFile
             $SourceDrives = Invoke-Command -Session $Session -ScriptBlock {
                    Get-PSDrive | where { $_.Free }
             }
             $SourceDrives = $SourceDrives | select @{ N = 'Drive'; E = { $_.Root } },
                                                                             Used,
                                                                             @{ N = 'Used(GB)'; E = { [Math]::Round($_.Used/1GB, 2) } },
                                                                             Free,
                                                                             @{ N = 'Free(GB)'; E = { [Math]::Round($_.Free/1GB, 2) } },
                                                                             @{ N = 'Free(%)'; E = { [Math]::Round((100 * $_.Free/($_.Used + $_.Free)), 2) } },
                                                                             @{ N = 'Total'; E = { $_.Used + $_.Free } },
                                                                             @{ N = 'Total(GB)'; E = { [Math]::Round(($_.Used + $_.Free)/1GB, 2) } }
             log 'Drive information on source server', $Server Green, Cyan $LogFile
             log ($SourceDrives | select 'Drive', 'Used(GB)', 'Free(GB)', 'Total(GB)', 'Free(%)' | FT -Auto | Out-String).Trim() -LogFile $LogFile
            
             $FileShares = Invoke-Command -Session $Session -ScriptBlock {
                    Get-WmiObject -Class Win32_Share
             } | select Name, Path, Description
             $FileShares = $FileShares |
             where { -not $_.Description.StartsWith('Default') -and $_.Path } |
             sort Path # Not need default shares
             log 'File Shares information on source server', $Server Green, Cyan $LogFile
             log ($FileShares | FT -Auto | Out-String).Trim() -LogFile $LogFile
            
             log 'Getting summary of currently connected users to file shares on server', $Server Green, Cyan $LogFile
             $ConnectedUsers = Invoke-Command -Session $Session -ScriptBlock {
                    Get-WmiObject -Class Win32_ServerConnection -Namespace 'root\CIMV2'
             } | select ShareName, UserName, ComputerName, ActiveTime # in seconds
             if ($ShowConnectedUsers) { log ($ConnectedUsers | sort ShareName | FT -AutoSize | Out-String) -LogFile $LogFile }
             $Groups = $ConnectedUsers | group -Property ShareName | Sort Count -Descending | select Name, Count
             log ($Groups | FT -AutoSize | Out-String).Trim() -LogFile $LogFile
            
             # Get share permissions
             log 'Getting share permissions for shares on server', $Server Green, Cyan $LogFile
             $SharePerms = @()
             foreach ($SharedFolderSec in (Get-WmiObject -Class Win32_LogicalShareSecuritySetting -ComputerName $ComputerName))
             {
                    foreach ($DACL in ($SharedFolderSec.GetSecurityDescriptor()).Descriptor.DACL)
                    {
                           $Props = [ordered]@{
                                  ShareName = $SharedFolderSec.Name
                                  SecurityPrincipal = $(if ($DACLDomain) { "$($DACL.Trustee.Domain)\$($DACL.Trustee.Name)" }
                                  else { $DACL.Trustee.Name })
                                  FileSystemRights = ($DACL.AccessMask -as [Security.AccessControl.FileSystemRights])
                                  AccessType = [Security.AccessControl.AceType]$DACL.AceType
                           }
                           $SharePerms += New-Object -TypeName PSObject -Property $Props
                    }
             }
             log ($SharePerms | sort ShareName | FT -AutoSize | Out-String).Trim() -LogFile $LogFile
            
            
             # Assemble the gathered information in a PS object
             $ShareInfo = @()
             $FileShares | % {
                    $ShareName = $_.Name
                    $DriveLetter = $_.Path[0]
                    $Props = [ordered]@{
                           ServerName = $Server
                           ShareName = $_.Name
                           Path = $_.Path
                           Description = $_.Description
                           ConnectedUsers = $(($Groups | where { $_.Name -eq $ShareName }).Count)
                           'DriveTotal(GB)' = $(($SourceDrives | where { $_.Drive[0] -eq $DriveLetter }).'Total(GB)')
                           'DriveUsed(GB)' = $(($SourceDrives | where { $_.Drive[0] -eq $DriveLetter }).'Used(GB)')
                           'DriveFree(GB)' = $(($SourceDrives | where { $_.Drive[0] -eq $DriveLetter }).'Free(GB)')
                           'DriveFree(%)' = $(($SourceDrives | where { $_.Drive[0] -eq $DriveLetter }).'Free(%)')
                           ShareUser = $(($SharePerms | where { $_.ShareName -eq $ShareName }).SecurityPrincipal)
                           SharePerms = $(($SharePerms | where { $_.ShareName -eq $ShareName }).FileSystemRights)
                           ShareAccess = $(($SharePerms | where { $_.ShareName -eq $ShareName }).AccessType)
                    }
                    $ShareInfo += New-Object -TypeName PSObject -Property $Props
             }
             log ($ShareInfo | Sort ConnectedUsers -Descending | FT -AutoSize | Out-String) -LogFile $LogFile
            
             $Session | Remove-PSSession
            
       } # foreach server
      
       if ($PassThru) { $ShareInfo }
      
} 






çıkan ekranda;



Get-FileShares -Computername ****























Outlook Lync Meeting Delegate etme (alıntıdır)

Lync 2013 Delegates Pt.1 (Non Lync Enterprise Voice enabled delegation) ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ 0 L...