Recursively changing permissions on folders with long path names
I've gotten a request to change permissions on specific folders for every branch office my organization has - 260+. I'm ok getting the folders, but I'm not sure the output/variable will be ok to pass...
View ArticleSend-MailMessage the server response was: #4.x.2 Too many messages for this...
I have a scheduled task that will check for passwords expiring in 15 days or less and fire off a reminder email to the user that they have x days left to change it. However, there are usually 70+...
View Articlewhat does "%" mean in powershell syntax
I know that typically the "%" character is for mod functionality. In some powershell scripts I've come across, I've noticed % being used after the | character and I can't seem to find what the syntax...
View ArticleShutdown warning popup window in Windows 7
Hi all.I need to execute a command that hibernates a set of computers remotely, and i get to the point that i have a psexec running a psshutdown to a list of computers from a file.Untill now, all is...
View ArticleCount number of users in distribution group
Hi,I need to find all distribution groups that have more than 50 recipient. I tried with this in ems:$grupe = Get-DistributionGroup $grupe | Where-Object { (Get-DistributionGroupMember -Identity...
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 Articleweb test result for a URL which needs a client certificate to authenticate
Hi, we want to check URL response of a .asmx URL which needs a client certificate for authenticating. I got the cert object and then passed it to invoke-webrequest cmdlet, but no matter what i try I...
View ArticleIssue with Pasting to Command Line/PowerShell
Hi,We are unable to paste text from an application other than Command Prompt (CP) or Windows PowerShell (PS) to CP or PS.The issue is only occurring on one of several Windows Server 2008 VMs.The server...
View ArticleError calling function;
Hi I have a requirement to connect to sql server and do various operations currently doing it through start-job but we find it very inefficient. Someone pointed to Runspace and this link....
View ArticleOpen an Excel spreadsheet with powershell getting error
I am trying to open an excel file within power shell. Here is the code i am using $excel =New-Object-com excel.application $excel.Visible=$True $excelfile...
View ArticleParameterBindingException when pipelining an Outlook.Folder object to custom...
Hello all-I've written a simple C# powershell cmdlet (Get-Store) that returns an Outlook Object Model Store object. Another cmdlet I've written reads the above Store object from the pipeline and...
View ArticleRemove-Item & Program Files folder: permissions error
I am attempting to use Remove-Item to delete a file in Program Files and getting a permissions error. But, I am a local admin, and I tried running the script as administrator. I have also tried -Force,...
View ArticleSolved - How to take ownership and change permissions for blocked files and...
Hello, I was trying to take ownership & fix permissions on Home Folder/My Documents structures, I ran into the common problem in PowerShell where Set-Acl & Get-Acl return access denied errors....
View ArticleSet-ADUser to modify givenname and surname attributes based upon displayname...
Hello to everyone, i'm trying to restore AD Users records to a proper shape. More in details,current AD users records contains only the displayname and the other mandatory attributes,everything is...
View ArticleOutput to a CSV has incorrect format
Hello There,I was attempting to output information to a csv via powershell, but each time I tried the format is incorrect. Below is the cmdlet I used to output to a csv file.[PS]...
View ArticleRemove entire O365 tenant - completely start new
Due to multiple changes to our O365 tenant through custom PS CMDlet scripts we have written we are now in a state of non-usable tenant. This is/was our POC to pre-stage our environment for our O365...
View ArticleAutomate a login script and exit Website - Problem with login in function
Hello All, I've started working on a script to login to a site automatically and have an output log file. The problem i have is the button (login nutton) line of code in my script, i'm not sure if it...
View ArticleTrying to make a group local admin, but access denied. Which right to set...
Hi Guys,I want to add an Active directory group as local admin. I use the following code:$groupAdmin="Administrators" $groupRdp="Remote Desktop Users" $pathAdmin =...
View ArticleRun Powershell script as Scheduled task, that uses Excel COM object
What am I missing here.. I have Powershell script that uses the Quest AD cmdlets to get computer information from AD and populate an Excel spreadsheet with the data.The script works fine, so I created...
View ArticleParsing sub-directories into csv
I have a directory with thousands of files all in an ordered sub-directory structure. I’m trying to export those files, along with their respective file paths, delimited, into a csv. Hierarchical order...
View Article