Powershell backup and then send email. send email has issues
<# Script: Backup database with email notification Version 1.3 - May. 31, 2024 This script performs full and transaction log backups of the Mobile database and sends email notifications. #> Variables $serverName = "TFS" $databaseName =…
Could not find any service with display name ‘XCELERAINST ’
Hi Experts, I was trying to install MSSQL 2019 via powershell. During the MSSQL installation we are setting instance service name as XCELERAINST. As per our code we trying to check the service XCELERAINST. If the XCELERAINST service already present then…
EventID for the GPO
I have enabled the GPO (Turn on PowerShell Transcription): Computer Configuration-Administrative Templates-Windows Components-Windows PowerShell. Turn on PowerShell Transcription: Enabled. Should I see any other Event ID besides 4103 in Event Viewer with…
Error Handling in ForEach-Object -Parallel CMDLET.
I Use a PowerShell 7 Script to Validate Resource Group and its JSON contents DisplayName, ObjectID and Role Definition Name. My Script will use Parallel block to loop through the subscriptions and validate RG First and then foreach Role Definition it has…
Ways on how to manage azure Devices and Find device location per office
Hi, Im on creating some automation to delete all stale devices in Entra ID (not in intune) and i need to find a way to find each device location so i can separate them every office. are there any ways to check the device location or physcial location? im…
Ways on how to manage azure Devices and Find device location per office
Hi, Im on creating some automation to delete all stale devices in Entra ID (not in intune) and i need to find a way to find each device location so i can separate them every office. are there any ways to check the device location or physcial location? im…
Need to configure Report to check daily backup, patch and Reboot status for azure virtual machine using Powershell script
Need to configure Report to check daily backup, patch and Reboot status for azure virtual using Powershell script
How to browse and delete files under C:\System Volume Information\DFSR\Private directory ?
How to force delete the below file from my DFS replication staging area? C:\System Volume…
Connect-Exchange Online (Error while sending the request)
Hello, I'm getting the below Error while connecting to Exchange Online (PowerShell Script) when called from .Net Application. #Import-Module ExchangeOnlineManagement #Connect-ExchangeOnline -Credential $Creds An error occurred while…
Exporting user last login to M365 or Azure to .CSV file ?
How can I extract and export the last user login time to the M365 portal or Azure AD as .CSV file? is there any PowerShell script or GUI procedure?
What is the best way to execute PowerShell graph command executed against Azure / Entra ID ?
What is the best way to execute the PowerShell graph command executed against Azure / Entra ID ? $date = (Get-Date -Format "yyyy-MM-dd") 2Get-MgRiskDetection -All -Filter "ActivityDateTime ge $date and RiskLevel eq 'high'" The report…
Connect-MgGraph : Invalid JWT access token. Connect-AzAccount : InteractiveBrowserCredential authentication failed
I need help and a solution to rectify the below error when executing the PowerShell Connect-* command. $TenantID = '22bb9241-65c8-45b4-94f9-7c151e154693' $AzSubscriptionID = 'd487514e-4317-447f-af79-5022d310f6bd' $paramConnectMgGraph = @{ Scopes =…
How to generate a report on a conditional access policy with Report Only mode ?
Hello Team, I'm looking for a free way even with a PowerShell script to get a report on a conditional access policy with Report Only mode. Thanks, Alaa Elrayes
Installing GIT with out asking prompts with powershell
I am using below link and using windows 64 bit standalone installer. https://git-scm.com/download/win I can install this manually , but i want to install git in agent ( target machine) using powershell with out asking for any prompts , can we do that, if…
Task scheduler scripts
Hi All i have 100 plus scripts running on a VM. i have task schedulers running daily, for few weekly. i want to export all the task scheduler scripts to a csv file. using the below syntax i am able to export $data = @() foreach ( $task in…
Add exact upns
Hi All i have userprincipalnames in a csv file in the below format. usernames user1@contoso.com user2@contoso.com i want to add these users to AD group from powershell. if there are any other user with user1.a@contoso.com or user2.a@contoso.com. i…
Query a Specific service Value through Powershell
I Need help with the below PowerShell command to query the value of Windows Update "IsDefaultAUService" PS C:\Users\Administrator> $(New-Object -ComObject "Microsoft.Update.ServiceManager").Services Output of this command …
PS script deployed via GPO not installing
Hello experts, I could use some help determining why a PS script deployed via Group Policy is not applying. I suspect it is due to the ExecutionPolicy restriction however I have attempted to bypass in the script parameters as well as adding the bypass…
Update Micorosoft Store and Store Apps with command line?
Hi To update Microsoft Store and Store Apps, I navigate to the Store and select "Get Updates", like above screenshot. Question: Is there any possibility to achieve the same with Command Line /Power Shell or DISM?
GPO is not applying
Hi All i am applying the below GPO on an OU, this OU has Windows 2019/2016 Servers. My domain controllers are a mix of Windows 2019/2016. On the member server when i check RSOP i am seeing that the GPO is applied but when i check from gpedit.msc the gpo…