fail to run command when using string variable to hold parameter
Hi,i am pretty new to power shell.i am working with it to configure vmware machine.the following code works:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ PS C:\Users\nir.s> $object =...
View ArticleChange default opening program on multiple servers
Hi all,I've a .opt file, which happens to be configuration file for backup. this files opens with notepad but we always have to choose the default program to notepad.I want to set the default program...
View ArticleDate Stamp and Move Files
All I have the below script which date stamps a file and moves it into the folder where the script is. However, I want to move it to a specific folder c:\archive can you help?Get-ChildItem...
View ArticleGet-Help : A parameter cannot be found that matches parameter name 'showwindow'.
I've updated to PowerShell version 3 on my Windows 7 SP 1 system. When I tried to run PS M:\> get-help get-service -showwindow Get-Help : A parameter cannot be found that matches parameter name...
View ArticlePowershell move-ADObject: ACCESS DENIED ---- not due to "protect from...
Hi,I originally posted this to the Directory Services forum and was told to rather ask the peeps on this forum.Please can someone tell me why the following Powershell is giving me this permissions...
View ArticleCreate a share folders on remote servers reading from csv file
Hi All, Today I am using the below script(got from this forum) to create a folder on remote server and then used new-share module to share it# Path to file share. $FileSrvPath =...
View ArticleIssue with expression in powershell statement
Hi,Does anyone know why this wouldn't work? To me it looks correct..get-distributiongroup -resultsize:5 | select Name,@{Name="mbrCount";Expression={((Get-DistributionGroupMember $_.Name).Count)}}The...
View Articlehow to get users with password never expires enabled that their...
Hello,I am a beginner with powershell, and I am doing a lot of reading throughout the forums.I have been trying to use several script lines I have found in here to lastly achieve my ultimate goal,...
View ArticleError "remote client exceeded allowed maximum"
Hi, I'd like to start all three scripts from this web page, like this one:Get-Mailbox -ResultSize Unlimited | Get-AdPermission | ?{($_.user -like "*user*") -and ($_.IsInherited -eq $false)} | select...
View ArticleFind Installed Software - Not displaying computer name
Chaps.I found this script kicking around on the internet which fits my needs in terms of finding all software installed or being specfic and finding say just Acrobat.The issue is that the .CSV never...
View ArticleWindows 2008 r2 task scheduler 0x0
I have a powershell script that exports some attributes from AD accounts and creates a file. That file then gets copied to a remote server. When I run the script manually from Powershell, the script...
View ArticlePowershell Scheduled Tasks won't start Excel
Is there a limitation on using ComObject Excel.Application in Powershell ?I have a powershell script, that creates Pie and Bar charts, works great when manually ran.however, when run it via scheduled...
View ArticleAD Module – Sort by Month of Date
Hello,I’m wanting to run a PS script that will give me a list of user accounts created within a specified month using the get-aduser –property WhenCreated attribute.I was hoping such command as...
View ArticlePowershell script in one folder calls a script from a second folder results...
I have a powershell script located here:D:\path1\script1.ps1Within D:\path1\script1.ps1 I need to call D:\path2\script2.ps1. script2.ps1 will in turn load some C# assemblies that are already placed in...
View ArticlePowershell vs IE F12 Developer Tools
Why can I not acess the DOM of frames with PowerShell, but I can through F12 Developer Tools?document.frames[0].document.getElementById("expample").innerHTML "Page Content"$ie.document.frames -eq $null...
View ArticleRPC 0x80010108
$global:ie = New-Object -com "InternetExplorer.Application" $global:ie.Navigate("about:blank") $global:ie.visible = $true When does $global:ie get disconnected from the RPC server because I'm trying to...
View ArticleHow to get an apppool with Get-Item in powershell?
I have try the following command but always receve an COM error. PS E:\WebSites> Get-Item "IIS:\AppPools\Rhino.Trunk"Get-Item : Cannot retrieve the dynamic parameters for the cmdlet. Unable to cast...
View ArticlePassthru with quser
#When I execute quser.exe from the command line one of the fields is labelled ID. If in powershell I assign a variable to exectuting quser.exe and use the get-member to query the results of executing...
View ArticleSending Credentials in PowerShell
When executing a powershell script / commands on a remote computer, does it pass the credentials in clear text? I currently use PSExec to remotely install / remove third party software and need to get...
View ArticleSql server thread count using PS>>
HI ,I am trying to get thread count using below command (Get-Process sqlservr |Select-Object -ExpandProperty Threads ).Countits returning out all sql servers count where i have 2 instances running on...
View Article