Using variables inside a scriptblock using | where-object
HiI have this issue with passing variables to my scriptblock.#Get files script block $getfiles = { Get-ChildItem -Recurse -path $args[0] | where { !$_.PSIsContainer -and $_.Extension -eq $args[1] } |...
View ArticleI'm at war against ... (literally '...' in PowerShell output). Are there...
One think I noticed when I first used PowerShell, and hated, was the truncation of output with the trailing '...' I want to develop some overrides or workarounds that allows the full content to be...
View ArticleHow Disable IPv6 and IPv4 in server 2012 Core By Using PowerShell
Dear Friends I have some Problem With Working with PowerShell As Using GUI Interface is Very simple to enable and Disable the IV4 and IPV6 even the Ethernet AdapterMy Question Is How Do we Can use the...
View ArticleI'm getting an error when I'm trying to execute poweshell command
Good day to everyone! I'm getting an error when I'm trying to execute poweshell command dirquota template modify /template:"Quota 100GB" /modify-Notification:95,M,quota_template.txt in powershell...
View ArticleProblems Using Code from Newer PowerShell Versions in Version 2
I use the PowerShell ISE, running version 4, on my workstation, and I write scripts there. I often copy the code back and forth to OneNote, using this script to copy it with formatting. This works...
View ArticleHow to reclaim memory consumed by New-WebServiceProxy
I am currently facing one problem in my SCOM management pack whose various workflow (discovery / rule / monitor) are based on PowerShell scripts. These PowerShell scripts connects to a WCF service...
View Articleshared calendars
We are running Exchange 2007, with Outlook 2010 as clients. We have several shared calendars, but I can't seem to located them / access them in Outlook 2010. When I Click on Open Calendar and the...
View ArticleScript which can force change password at Next Logon
Looking for a script(VB/Powershell/batchfile) which can ask for a username as an input and help desk agent can reset user password. Script will also have a code which will force the user to change the...
View Articleenter-pssession failing locally, but not remotely
My setup:2 windows 2003 domains, doma and domb. Domb trusts doma with a one-way forest trust. Server in question is in domb, user account is in doma. Box is W2K12r2, but same problem occurs on W2K8r2...
View Article"Unable to process the request due to an internal error" After AD Upgrade
Hi,We've recently moved and upgraded our AD from Server 2003 (with W2K3 functional level ) to Server2012R2 (and W2K12R2 Functional level). The upgrade was completed successfully.However, a user has...
View ArticleUnable to "MANAGE MSQM" from Failover Cluster Manager when a Clustered MSMQ...
Hi,I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of...
View ArticleFile permissions to excel
Can anyone tell me why this script isn't working?clear-host $Servers = Get-Content("C:\Scripts\NextGen\Servers.txt") $Excel = new-Object -comobject Excel.Application $Excel.visible = $True $Excel =...
View ArticleDelete Desktop Shortcuts Contaning Specific Words
I'm trying to create / modify a script to delete shortcuts found in "c:\users\" (each user's desktop actually, including public) that contain a certain file extension in the target.I found this script...
View Articlewhat are the non-obvious side-effects of using...
I'm thinking about dropping these two lines into my profile.ps1 script:$psdefaultparametervalues.add("ft:wrap",$True) $psdefaultparametervalues.add("ft:auto",$True)Are there any adverse side-effects...
View ArticleReport of Groups owned along with group memberships for each group, all in a...
Hello all,What I'm trying to do is generate a report of all groups owned by a specific user, along with the group memberships, and output it all to a single .csv file. In the .csv file, I would like to...
View ArticlePowershell and SCCM 2012 Collections from AD
Greetings everyone, I am trying to take a select of groups in a certain OU within AD to make SCCM 2012 user collections from. I been playing around with just creating the collections based upon a txt...
View ArticleSet-ADAccountPassword failing
Good morning People of the Powershell!My question isn't as simple as it sounds. To "pre-disable" users in our environment, we run a script which changes their password, removes their group...
View Articlesolution to a text file line wrap to enhance readability of the text?
Is there a PowerShell solution wrapping text to enhance readability of the text?Perhaps in a form of a script that reads one text file with extra long lines, and produces a text file with lines of a...
View ArticlePowershell script to enumerate local secpol
Can someone help me with a script to enumerate the following items in secpol:Password PolicyAccount Lockout PolicyAudit PolicyUser Right AssignmentSecurity Options Thanks,SMaximus7
View ArticleAutomate set folder permissions
Hi Id like to automate the setting of folder permissions on folders during the PC build processI need for other users to ru the script and the default pc image will have powershell 1 and the...
View Article