Issue with the Creation and updating Environment variables.
Hi All,I am facing weird issue. I am creating env variable and assigning a particular value .[Environment]::SetEnvironmentVariable("mytestvar","my value","machine")but when i try to access the value of...
View ArticleErrors while trying to login to Azure subscription
Hi, I have 6 subscriptions access (different user accounts) in separate tenants. I would like to get resources details from all subscriptions using PowerShell script. And I am using below script to...
View Articlehow to export all users with member of group in active directory
Hi All,anyone can help me to find out all user, where is user a member of each distribution group in active directory. i was find by google, and i just found how to export all distribution group with...
View ArticleGet list of mailboxes in my organization
($O365 = Get-Mailbox -ResultSize Unlimited | Where {$_.RecipientTypeDetails -eq 'UserMailBox'} | Select -Property Name , Alias). Count Where Customer has 180000+ mailboxes in his org, Command gives...
View ArticleUnprotect-CmsMessage on a Remote Host
Hello Guys,I have a little issue with the Unprotect-CmsMessage cmdlet.Please have a look on the following scenario:Preparation:User A on Server A encrypted a pw-file with a self signed certUser A wrote...
View Article[ADSI] vs Invoke-command vs adfind
Greetings, If you are writing scripts that everyone needs to execute and the script needs to access an AD object, does it matter which method you use? The [ADSI] accelerator is local but not very...
View ArticleAppend an AdditionalResponse message to one that already exists
Append an AdditionalResponse message to one that already exists using powersell Get-CalendarProcessing -AdditionalResponse
View ArticleCreate Outlook 2013/2016 Email Accounts (not Profiles) with Powershell?
Sorry if this is posted somewhere already but I couldn't find it anyways. I know I can do this with exchange however we are not running an exchange server.For all intent and purposes, how would one...
View ArticleNeed help with collecting combined data into a variable and out to another...
I have modified some code to work with what I need to collect data from two different commands into one. It works great for one server but when I try to run it against a list of servers it falls apart...
View ArticleDHCP scope information PS script
Hi,I need help with attached script below. As of now it generates one default.htm file but that whole report does not appear in message body as it looks like in the report. so please make necessary...
View ArticleQuorum / Witness Disk Report
My request would be to build a report that given an exported list of clustered flavor servers such as 2003, 2008, 2012, 2016, 2019 - which server holds the witness disk. Clusters are 2-node or 4-node...
View ArticlePowershell DateTime to String
Hi,I'm currently getting data from a SQL Server. I use System.Data.DataSet to return data as well.In the data, there is a column in DateTime format.I would like to know how can I convert a DateTime...
View ArticleRenaming Computers by Referencing Serial Number
I created this script to rename computers by referencing two external files with serial numbers and new names but it's not working, I'm getting incorrect syntax errors. My IDE isn't picking up any...
View ArticleI need to switch the account on the remote computer and activate it!
I need to log on to another account on the remote computer and keep it active. Perform specific window tasks[192.168.2.16]: PS C:\Users\he123\Documents>quser.exe...
View ArticleLog Monitoring with specific keywords
Hi,We have three jobs (eg: firstjob_date) so when the first job gets triggered there is an entry made in logs folder which keeps on updating and once it completed the other job triggers automatically...
View ArticleGet AD Computer Object Date last connected to domain
Before anyone pastes me a solution based on last logon please take a moment to tell me if there is another solution. Last Logon is useless for a system that remains connected for extended periods...
View ArticleHow to gracefully close auto starting at logon programs via a script
I have some apps that launch automatically when I log in, like Skype, Teams, Slack, and a few others. Sometimes I don't want all those to launch though. I see there is stop-process in Powershell,...
View ArticleHaving problems with setting Applocker policies GPO through Powershell
I built a powershell script to automate the setting of a GPO for Applocker so it can be deployed on multiple domains. Unfortunately I receive a weird error when the GPO has been set, in the console of...
View ArticleNodeJs code running inside Task Scheduler
Hi,I have configured a task scheduler which is running nodejs code. Though I have marked the checkbox of "If the task fails, retry every". But when any error occurs, task scheduler doesn't re run...
View ArticleNeed the SharePoint Online site list based on Created Date.
I have requirement where i need to get the list of the SharePoint Online site collection created in the previous month.And also the Size of it.Abdul Haseeb
View Article