Get Shared Mailboxes with Specific Filter
I'm in need of assistance on scripting a powershell to find all shared mailboxes that have Global AD Security Groups with 'SendAs' permissions assigned to them. Exchange is on prem and I have tried...
View ArticleFile and Folder Ownership and Permissions
I know this has been adddressed in another forum post. I got a Powershell script that works amazing for setting the Owner and adding permissions for a group to a folder and all subfolders. But I need...
View ArticleAD Module for Windows PowerShell - Insufficient Access Rights to perform the...
I have a recently upgraded domain that's now running all 2008R2 DCs. The domain functional level is 2008R2 and the forest functional level is 2003. I've also created a brand new lab domain with...
View ArticleIssues with loading Exchange Commandlets from batch file
Hi,I have a powershell script which loads active directory module and exchange commandlets. This works fine if I run file.ps1 within powershell ISE. When I try to run file.ps1 from a batch file I get...
View ArticleWSMan Initialization failed with error code: -2144108171.
My C# code try to connect exchange server through powershell, I got this error "WSMan Initialization failed with error code: -2144108171."on the code of runspace...
View ArticleUnable to fecth EmployeeID from diffrent forest
I'm trying to fecth employeeID from diffent forest and getting null, fine with all other attibutes and same script is working for local domain without any issue. Please let me know how to get the...
View ArticlePowershell script to check for a string in a file and send email notification
I am working on a powershell script that is working fine for other string search but not this one. I was hoping to get help whyPower shell script construct is here:$file = "C:\temp\test.log"...
View ArticleStart-WebAppPool Remotely -Name Variable is sent as $Null
When I do this:$Server = Read-Host "Enter Web Server Name" $AppPool = Read-Host "Enter Application Pool to Restart" Invoke-command -ComputerName $Server -ScriptBlock { Stop-WebAppPool -Name $AppPool }I...
View ArticleADAL token problem when connecting to PowerBI Service via API from powershell
hi, I'm trying to connect to powerBI by using API from powershell. this is the code that I'm using:$common = $PSScriptRoot + "\common.ps1" . $common ##set parent directory for this file #set project...
View ArticleMissing optional "BrowseOnly" Windows Updates from COM IUpdateSearcher
This is a copy of my post to Windows 8.1 IT Pro forum. The moderator there said post it here:I am using powershell to manually apply certain updates and I think I've encountered a bug, but I'm not sure...
View ArticleWin32_NetworkAdapterConfiguration SetWINSServer
Every time I think I've seen WINS for the last time I run into it again.I was working on a script to help clean up an environment's WINS and I've run into a problem. I try to use the .SetWINSServer...
View ArticleSQL Powershell Error: Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' is not...
When I try to run a powershell script I get the following error: Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. So in...
View ArticleFind method in excel using powershell
I am trying to find values in a column in one excel sheet in a column in another sheet, however for example I have the word samsung which I am searching for.. however the other column has the value...
View ArticleExtracting element values using PowerShell
For how simple this is, I have not been able to find a solution.Take a simple XML file like the below where each element has a value and no attributes within the <> -...
View ArticleExtracting XML element values using PowerShell
For how simple this is, I have not been able to find a solution.Take a simple XML file like the below where each element has a value and no attributes within the <> -...
View ArticlePowerShell doesn't execute command line and stalls?
Hi,I am very very new to PowerShell and I have a problem using a command line that I found on the web. I actually used that command line a week ago to change similar parts of multiple file names. This...
View ArticlePowerShell on disconnected environment
I have PowerShell installed on a disconnected environment spent days trying to get this working, with no success!! I would appreciate any assistance to resolve this.I followed the example used in an...
View ArticlePowershell Script to Delete Users Profile if placeholder file is older than...
Check User Profile folders for existence of file mig.txt at \\domain.local\Shares\Profiles\%username% If Mig.txt doesn't exist Then Do Nothing If Mig.txt exists Check Mig.txt creation date If creation...
View ArticleDetect Virtual Machine and Logical Processor/Processor Socket ID mapping...
When I do this:if ((pPipe = _wpopen(L"powershell -Command \"Get-Counter '\\Hyper-V VM VID Partition(*)\\*'\"", L"rt")) == NULL) exit(1);I get this output: \\win-3t40ilvkkvh\hyper-v vm vid...
View ArticleHow to use Regular Expression to find SSN and then replace
I found a regular expression in a pattern I think I need for Social Security Number.(?!000)(?!666)^([0-8]\d{2})(\d{2})(\d{4})$My files do not have spaces within the numbers or hyphens.I want to find...
View Article