Powershell Get-EventLog and Security Event Log
Hello Community,I am running the following command from a ps script: Get-EventLog -LogName Security -After $startDate -Before $endDate -ComputerName $strServerwhich works perfectly getting the events...
View ArticleUpdate SharePoint List
I have a PowerShell script that is supposed to read a list of computers from a text file, and update SharePoint on whether that computer has a specific file on the C drive (and handle any items already...
View ArticlePowershell hangs?
Hello everyone, this is going to be one of those questions well i can't explain why it happens but i'm hoping someone here can explain any mitigation and if not at least explain why it happens. I've...
View ArticleSecurity Considerations When Reading SQL Errors Logs Via PowerShell
Hello, I recently learned that I can use PS to parse SQL Error Logs, which is something I am currently doing manually. As such, I would like to set up a SQL job that runs a PS script that queries the...
View ArticleCalling powershell script from a batch file
Hello All,I have a batch script that calls a powershell script. Before calling the script I set the execution policy to unrestricted, but when it gets to the line that calls the batch script i still...
View ArticleWhat -filter attribute can I use to search for this?
I am trying to push an attribute from a group of AD Contacts to their corresponding AD Users. The Contacts are in AD with their displayName formatted such as "FirstName LastName" or like "Tony Stark"....
View ArticlePowershell - Check Windows Service is started or not started
Hi all,I am new to powershell and I am looking to write a script that will check if a service is not started and will start the service and if it is started will confirm that it is started in a log and...
View ArticleUsing a Variable to Substitute the path\filename of a Batch file in the...
I am trying to write a script that will execute a batch file on a remote Windows server.This line below is basically what I'm trying to do and it works without error, however I would like to use a...
View ArticlePowershell and robocopy pausing
I am using powershell and Robycopy to move files from volume to another. Server 2008R2 iSCSI volumes onIt seems that powershell window occasionally pauses. When I hit enter the process just starts up...
View ArticleHow to test if a csv file is empty or not and email it?
Hi,I am new to powershell scripting and i have a small task which is basically i have a csv file which will sometimes be empty(it will have header row even if its empty ) and sometimes it will have...
View ArticlePS script that monitors and sends out an email based on expiring PKI...
I have a PS script that exports all certificates in a certificate authority store into a .csv file, goes through it and looks for certificates within X number of days given. It does not seem to return...
View ArticleInsert Function in Build-ContextMenu
Hello and thanks, please i have a powershell script that create a menu with options :$objContextMenu | Build-ContextMenu -index 0 -text "NoTePaD" -Action "C:\Windows\notepad.exe" $objContextMenu |...
View Articleget last instance of log using a seperator
Hi, I have a continuous log from an app, where I only need the log from latest run. The only thing i can use as a separator in between previous logs and the log from last run is a string "Log...
View ArticleGetting the last shadow copy date of a file
When looking at a particular file on the server (2008), we see entries under the previous version tab. I need a script to enumerate through an entire directory (and subdirectories), and print out the...
View ArticleGet-ADUser lastLogonTimestamp is reporting blank
Hey guys,I'm simply looking to get a list of users and their last login, in it's simplest form I'm trying this:Get-ADUser -filter * -searchbase 'CN=Users,DC=domain,DC=com,DC=au' -Properties...
View Articleevaluate date/time from file - count instances of line 1 week back
ok, not the best title but I'll try & explain.I want to:1. log username that logs on to PC2. log time of login3. write this info to a file4. open file, count number of times the same user logged on...
View ArticleList all users and their OUs they belong to
Hi,I would like to list all users with the OU they belong to and furthermore add an specific attribute that was added...I can get both information separately:get-aduser -SearchBase...
View ArticleWeird connetion errors in remote powershell session against exchange online..
Hello Experts - I had this posted here but was asked to post it here. Can someone please help me. Thanks.
View ArticleProtocol or API used by Office 365 and Exchange online powershell cmdlets?
Hello All - I was going through some MSDN blog (cannot find the link now :( ) which explained what exactly happens behind the scenes when we execute Office 365 or Exchange online cmdlets. I read that,...
View ArticleCopy email from ThunderBird into Excel / Libre Calc
This is above my head but It would be useful to me and I'm not sure if it's possible or not :When someone applies for a job from our company website I get an email with the form on it - no file...
View Article