powershell script not sending email when run as a scheduled task
Hi All,I was given some help from you guys to get a wmi reboot check working which it now does fine but when i run it as a task I do not get the email.This is what I run on a w2008r2 box $a = gc...
View ArticleDLL Name and Version, path with Security Update Package attributes
I know according to powershell version I could retrieve Description, HotFixId , InstallOn , etc using WMI or get-hotfix. Is there a way to retrieve the dll name and Version of the security update thru...
View ArticleHow to get date a computer added to domain?
whencreated attribute is not sufficient as it does not account for computers that are removed/rejoined. Any way to do this?Thank,Jaime
View ArticleGetEventLog - how to have 'Message' property expanded in one line
n PowerShell v2 i'm using this cmdlet Get-EventLog Security | Export-csv C:\file.txt and get the following result.I need to get all information in one line. In my sample the 'Message' property is...
View ArticleWhat Escape char. to use
I'm try to run this IIS cmdlet from a script:Set-WebConfiguration system.webServer/httpRedirect "IIS:\sites\$i.SiteName" -Value...
View ArticleModules and remoting
I have a large script that remotes to several servers and performs various tasks, most of the code is stored in sub files inside script blocks and dot sourced. Depending on the task called, the various...
View ArticleCreating Excel File through Powershell
I am using the below for an automation$Excel = New-Object -Com Excel.Application Will this work in a machine where MS-Office not installed? If it will not work, is there any plugin that can be...
View ArticleWhy does the WRITE-HOST in the tiny script make the output flicker?
Here is a tiny reproduction of a screen output issue I am having. I guess I don't understand why this flickers since I am repainting the same pixels each loop.Thanks for any suggestionsFunction...
View Articleretrieve dll from security update on a machine
Is there a microsoft tool allows you audit and verify dll for corruption after install?If not what will be the best efficient way to retrieve all dll names, size and path and version from security...
View ArticleLengthy process inside Foreach looping
Hi,In order to check whether some processes have completed or not, I created a foreach loop as...
View ArticleHow to identify what module should be loaded
Hi Im new to PowerShell, How can I identify what module to load from a specific command,In MSDN Library for C# they have a portion in the webpage what assembly should be loaded if you want to use a...
View ArticleGetting DHCP information through PowerShell Automation
How can I use powershell or any command line tool in windows server 2008 r2 to export DHCP information in the format of Reserved IP - 10.200.8.24MAC Address - 001d7202bd60Description - Beth...
View ArticleHow to place PowerShell exception into a Win Form Text Box?
Greetings,could you help me with a question?Basically, I wrote a Win Form in Visual Studio 2010. My application opens powershell and runs a simple script. New-AdUser.....and it gives me an exception in...
View ArticleDealing with Varbinary fields in Powershell
Hi,I'm trying to pull some data out of SQL Server, convert it into a DataTable, then push it back into a different SQL Server database using the SQLBulkCopy command.Varbinary fields are causing me...
View ArticleAdd-Computer to domain with new name returns error
Hi Folks:I am writing a script that configures servers and joins them to a domain. Near the end of the script I've added the command,Add-Computer -DomainName 'domainname' -Credential (Get-Credential...
View ArticleHow to make vim, more, irb... work in a custom PowerShell host?
I am making a custom PowerShell host, as described in the MSDN example (can not add the link because the account is new and unverified)The only difference from the tutorial above, that mine has to be...
View ArticleSystem.String from char array
Basically NameB contains a string what I would like to see as System.String. This little script does not work.[System.Byte[]]$NameB= @(0x4D,0x69,0x63,0x72,0x6F,0x73,0x6F,0x66,...
View ArticleImport-CSV issue with multi-value columns
I'm not very well versed in Powershell and I've been tasked with the bulk creation of a booking system in Exchange 2010 (new room finder for users) using a CSV file with 51 columns that contains all...
View ArticleReturn Multi-Valued Attributes?
I am trying to dump a list of values on a single attribute. This isn't an issue for single-valued attributes. Those display just fine.$strFilter =...
View ArticleButton Caption
Hello WizardsI tried a Windows Form, as below:function ShowDlgBox ($Title, $Msg) { $Window = New-Object Windows.Window $Window.SizeToContent = “WidthAndHeight” $Window.Title = $Title $Window.Content =...
View Article