<?xml version="1.0"?>
<rss version="2.0"><channel><title>Dla firm Latest Topics</title><link>https://www.gurupc.pl/index.php?/forum/43-dla-firm/</link><description>Dla firm Latest Topics</description><language>en</language><item><title>Top 5 USA Business Email List Providers</title><link>https://www.gurupc.pl/index.php?/topic/8775-top-5-usa-business-email-list-providers/</link><description><![CDATA[<p>
	Artificial intelligence goes beyond limits<br />
	A lot of people are scared of such technological growth. Well, they might be right. When machines start recognizing pictures, and videos, and describe them to us, it means that technology is taking these robots beyond their limits.
</p>

<p>
	<br />
	The good news is that there is a use <strong><a href="https://www.b2cdatabase.co/usa-email-list/" rel="external nofollow">USA Email List</a></strong> to this technology. It is not only developed to win a challenge, or defy the limits of research and technology. As I mentioned earlier, Facebook uses artificial intelligence it to expand its community, without excluding anyone.<br />
	Facebook
</p>

<p>
	<br />
	When it comes to artificial music, some applications identified this new trend and working around it. There’s a mobile app called life that plays music according to your state of mind and your mood. You might ask yourself, how does a machine know what one is feeling in real time? The machine gathers information about the person’s behavior or their location location and analyzes their mood. Some data analysts use Instagram filters for example, to identify the user’s mood: dark colors reflect sadness, whereas bright colors represent happiness. This music mobile application is said to help people in pain by distracting them and using the popular benefits and virtues of music.
</p>

<p>
	<br />
	 <br />
	Maybe machines will help us create new music genres, by combining different algorithms. Or maybe this new invention will help people manage their stress or heal their pain, music being the cure to everything! We can see the bud of that technology today with Spotify that can detect your running speed and adapt the music type and tempo.
</p>
]]></description><guid isPermaLink="false">8775</guid><pubDate>Mon, 08 Apr 2024 17:18:54 +0000</pubDate></item><item><title>[Powershell] Skrypt do zmiany nazwy katalogu dla zwolnionego pracownika</title><link>https://www.gurupc.pl/index.php?/topic/2032-powershell-skrypt-do-zmiany-nazwy-katalogu-dla-zwolnionego-pracownika/</link><description><![CDATA[<p>Całkiem niedawno stanąłem w obliczu szybkiego przejrzenia zasobów Active Directory pod kątem wyłączonych kont i zrobienia porządków na udziale sieciowym na którym są udostępnione foldery użytkowników. Ponieważ praktycznie od wdrożenia usług poprzez terminal serwer nikt nic z tym nie robił było sporo rzeczy do poprawki. Oczywiście całą pracę można wykonać ręcznie, ale pytanie po co? Łatwiej posłużyć się skryptem w powershell który zrobi to za nas <img src="https://www.gurupc.pl/uploads/emoticons/default_smile.png" alt=":)" srcset="https://www.gurupc.pl/uploads/emoticons/smile@2x.png 2x" width="20" height="20"> 1. Listowanie wyłączonych kont dla konkretnego oddziału firmy</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">Get-ADUser -Filter 'enabled -eq $false' -SearchBase “OU=Users,OU=OUOddział,DC=Firma“ </pre>
<p>Jeżeli pominiemy ograniczenie oddziału dostaniemy listę wszystkich wyłączonych kont w AD, a tego nie chcemy, dlatego zawężamy kryteria wyszukiwania. Dzięki temu zapytaniu mamy coś takiego</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">DistinguishedName <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> CN=nazwa_usera,OU=Users,OU=OUOddział,DC=FirmaEnabled           <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> FalseGivenName         <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> xxxxxName              <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> xxxxxObjectClass       <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> userObjectGUID        <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> 76279cff-e635-xxxxx-b3ff-xxxxxxSamAccountName    <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> xxxxxxxxxSID               <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> S-1-5-21-xxxxxxxx-1726128142-xxxxxx-12760Surname           <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> xxxxxxUserPrincipalName <img src="https://www.gurupc.pl/uploads/emoticons/default_cry.gif" alt=":"> xxxxx@domena.com</pre>
<p>jak dla nas nieco za wiele danych, więc je ograniczamy:</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">Get-ADUser -Filter 'enabled -eq $false' -SearchBase “OU=Users,OU=OUOddział,DC=Firma“ | Select Name, GivenName, Surname</pre>
<p>Wynikiem tego działania jest lista:LOGIN (jak i też nazwa homedirectory), Imię, nazwisko 2. Mając tak przygotowaną listę możemy już przystąpić do właściwej analizy udziału z katalogami użytkowników Test czy lokalizacja istnieje: </p>
<pre class="ipsCode prettyprint lang-auto linenums:0">Test-Path -path serwerudział$nazwa_katalogu</pre>
<p>Jest to o tyle istotne, że nie wiemy czy katalog został założony, a jeżeli tego nie sprawdzimy powłoka będzie nam niepotrzebnie zwracać komunikaty o błędach. Rozwiązujemy ten problem prostą pętlą</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">ForEach-Object {$username = $_.name; if (Test-Path -path serwerudział$$username) {Write-Host "Directory OK " $username $_.givenname $_.surname} Else {Write-Host "Directory Not exists " $username $_.givenname $_.surname} }</pre>
<p>Jak widać w przykładzie powyżej podałem już nazwy zmiennych których użyłem w poleceniu ($username, $_.givenname, $_.surname, - odpowiadają one Select Name, GivenName, Surname). 3. Oczywiście nazwy katalogów trzeba zmieniać (jeżeli istnieją)</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">rename-Item -Path serwerudział$$username -NewName serwerudział$ARCHIWUM_$username;</pre>
<p>Poruszanie się na udziałach za pomocą odwołań do serwera (serwerudział$) znacząco ułatwia sprawę - nie zawsze mamy czas na mapowanie wszystkich potrzebnych udziałów. W Windowsie mamy możliwość przypisania tylko 24 liter dla nazw dysków, więc posiadanie sporej liczby udziałów mocno komplikuje sprawę, gdy trzeba wykonać taką operację na kilku lokalizacjach. 4. Składamy wszystko do kupy i otrzymujemy:</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">Get-ADUser -Filter 'enabled -eq $false' -SearchBase “OU=Users,OU=OUOddział,DC=Firma“ | Select Name, GivenName, Surname | ForEach-Object {$username = $_.name; if (Test-Path -path serwerudział$$username) {rename-Item -Path serwerudział$$username -NewName serwerudział$ARCHIWUM_$username; Write-Host "Directory OK " $username $_.givenname $_.surname} Else {Write-Host "Directory Not exists " $username $_.givenname $_.surname} } </pre>
<p>I mamy pracę z głowy. Warto przy tym wspomnieć o tym, że mamy możliwość wyeksportowania naszych działań do pliku, w tym celu dodajemy na końcu</p>
<pre class="ipsCode prettyprint lang-auto linenums:0">| Out-File -filepath "C:log.txt"</pre>
<p>Oczywiście wymaga to drobnej zmiany w skrypcie</p>
<pre class="ipsCode prettyprint">Write-Host</pre>
<p>zmieniamy na</p>
<pre class="ipsCode prettyprint">Write-Output</pre>
<p>Jeżeli tego nie zrobimy wynik działania skryptu zobaczymy tylko w konsoli, a plik tekstowy pozostanie pusty</p>
<p> </p>
]]></description><guid isPermaLink="false">2032</guid><pubDate>Tue, 26 Feb 2013 12:47:18 +0000</pubDate></item></channel></rss>
