Why is the last block applying only on second pass ?
#I made a script to apply modify permissions to an ad group and to remove read#permissions from BUILTIN\Users due to security reasons.#Everything is häppening in local server.#Everything works from...
View ArticleGet Mailbox Permissions in CSV file - only from ADUsers with a givenname
Hey! I need to make a CSV file with the name of the mailbox (mb Identity), user, accessrights and deny. But I only want to that for ADUsers who have a givenname AND a surname not only a surname.I...
View ArticleHow to Upload the Display Templates into SharePoint 2013 Using PowerShell
As I said in the earlier article, the script to upload the Display Templates is as follows. I hope it does not require much explanations. Read More
View ArticleAutomation Threesome: PowerShell, SCCM and Adaptiva OneSite
These days, it’s almost impossible to read a technical blog or community forum without coming across some kind of PowerShell script or snippet to perform some arbitrary function that you absolutely...
View ArticleViewing and filtering of ULS logs using powershell in Sharepoint 2013
SharePoint ULS logs can be filtered using powershell and generate grid-view, allows additional filtering. This can be handy to troubleshoot or searching with in ULS logs.Read More
View ArticleSecurity Focus: Defending PowerShell with the Anti-Malware Scan Interface (AMSI)
Naturally, I was intrigued when I heard that some new anti-virus and anti-malware capabilities were coming to PowerShell in the form of...Read More
View ArticleLog PowerShell command outputs with Group Policy
The “Turn on PowerShell Transcription” Group Policy allows you to log the input and output of PowerShell commands into text-based transcript files.Read More
View ArticleExtracting specific events from event log
I need to extract a specific event (event 4624) from the Security log of a Windows Server 2008 R2 server to see the list of interactive logon to a remote desktop server, but only if "Logon type" is...
View Articlerunning task on remote machines
I have this code: $uname = (Get-WMIObject -class Win32_ComputerSystem).username$pcname = read-host "Enter computer name"$i = Get-WmiObject -Class CCM_Program -Namespace "root\ccm\clientsdk" |...
View ArticleNeed help for finding a particular file present anaywhere in C: drive on...
Hi,I am new to powershell and have been learning it from some time,I just have a small task to check for a particular file in entire C: drive of a set of servers and display the paths where the file...
View Articleplease explain this behavior
I'm learning PowerShell and found something that doesn't make sense will the little knowledge I have for now.I wish to see the static members of math, so I tried this [math] | gmthis gave me: TypeName...
View ArticleCombine and arrange text files
I am using the get-content and sort-object -unique cdmlets to combine text log files via:(Get-Content .\*ninite.txt) | sort -unique | Set-Contentinstallreport.txtExample text files are uploaded here....
View ArticlePowershell script that detects Connection Status of Virtual Desktop and...
Hi, I have a pool of non-persistent VMs and users do not click on Start, Log off but instead they click on the X at the top right corner to close the VM. This action does not restart the VM. Only...
View ArticleCheck whether user exist in AD or Not and write Out-file based on results
Hi,trying to write a script in powershell which will check whether the user exist in AD or not , the script works fine but the output doesn't put the username if not found does not exist in AD ()...
View ArticleHow to find disabled/inactive accounts in Active Directory using powershell
Log in to your active directory server and start the active directory module for powershell then run the following command to get as list of users.Read More
View ArticleInstalling a SQL server on a remote system using Powershell 3
Hello, I am trying to make a skript which installs the SQL Server (2013 Express) remote on another mashine (Server 2012). The first thought was, to use the Invoke-command:Invoke-Command -ComputerName...
View ArticleUse Powershell to find Users Mapped Drives
We have recently changed the way users connect to our file shares, from dfs to server dns alias, before turning off dfs I would like to confirm (as much as I can) that no user is using the old dfs...
View ArticleSearching the Registry Uninstall Key with PowerShell
Here’s a little PowerShell function I wrote....Read More
View ArticleAutomating IIS SSL Certificate Installation with PowerShell
Let’s get one thing straight. I hate cryptography and certificates. Over my career, I’ve been the “certificate guy” on a few occasions. However, it was just another hat for a system administrator. I...
View ArticleBasic PowerShell: Cmdlets and Aliases
I thought I’d continue with more PowerShell basics.Read More
View Article