powershell – Classic SharePoint experience

I hope you are well;

I currently had the classic Experience set up for all site collections in SharePoint Online, however, this morning has changed everything to a modern experience for lists and libraries.

I would like to know what is the best way to revert it to the Classical Experience.

iis: registration when ApplicationPool is started / stopped through Powershell

I use a Powershell script to, among other things, start and stop a group of IIS applications through the following commands:

Stop-WebAppPool -Name $ appPoolName;
Stop-WebAppPool -Name $ appPoolName;

Is there an IIS log file where the event is logged, which is the start and stop of a group of applications?

As suggested here, I've already looked at the Events viewer under System, But I did not find anything.

I also know that cutting down Recycling can be configured in detail in the Advanced settings of the respective application group in IIS, but I'm not sure if this applies to start / stop, because I'm not actually recycling.

windows – Can not use "-" char to specify arguments in powershell

As the title said, every time I try to specify an argument for a command using "-" (as git log -r) in powershell, the character "-" and everything that follows is read as a simple spatial character.
I can use scripts correctly if they are attached to other words.

I'm using powershell in Windows 10 with oh-my-posh

powershell – Migrates the user's mailbox calendar to the public folder (shared calendar) in Exchange

We use Exchange 2016. A user shares his calendar with other users through Outlook (2010, 2013). To undock this calendar from your mailbox and convert it to a shared calendar, we want to transfer it to a public folder, preferably using PowerShell.

So far, we have exported (although I am not sure if this was successful) the calendar with:

New-MailboxExportRequest -Mailbox a.user -IncludeFolders "# Calendar #" - FilePath \ PST  user.pst

How do we import the user.pst in a public folder?

infopath: extracting data from the manifest.xsf file using PowerShell

Hello, I am trying to extract information about the rules that apply to various InfoPath forms and I am using Powershell to do so.

I have unpacked the template.xsn file, and found the manifest.xsf File that stores this data.

Using the PowerShell [xml]$ ProjectXmlFile = Get-Content manifest.xsf to get the xml data, I can not identify the nodes correctly.

The nodes are identified using the "xsf:"precursor, for example:

    The form can not be sent due to an error.

How do I identify these nodes to get the information as normal xml data (that is, if the nodes did not have the prefix "xsf:")?

This is what I have been trying to use:

foreach ($ DataQuery in $ ProjectXmlFile. & x39: xsf: xDocumentClass & # 39;. & x39: xsf: dataObjects & # 39;. & # 39; xsf: dataObject & # 39;. & # 39; xsf: query & # 39;. & # 39; xsf: sharepointListAdapterRW & # 39;)
Write-Host "DataQuery.name = $ ($ DataQuery. & # 39; xsf: name & # 39;)"

Or is there another reason why I can not access these nodes?

PowerShell – The return does not behave as expected

I am using PowerShell v5.1.
I have a question about "Return". Should not "Back" stop the execution of the script?

Get-CimInstance Win32_OperatingSystem | ForEach-Object {
"Go out"
He came back
"He does not"

ForEach ($ number in 1..2) {
"Go out"
He came back
"He does not"

The result is: Exit => No = = Exit

As you can see, "Return" behaves differently within the "ForEach-Object" loop and then inside the "ForEach" loop. What am I missing? Thank you 🙂

Active Directory: The Powershell startup script in GPO does not run. Windows Server 2016

I'm trying to get a simple Powershell script to run as a GPO startup script on my school workstations. So far I have not had much luck. The script started as a more complex set of commands to determine if an application was installed or not, and what version, and then install an updated version if necessary. None of that worked, so I reduced the script to just two lines to see if the script even runs. It does not seem to be.

The current code:

set-content -Path c:  PSTests  PSTest.log -value "The PSTest script ran successfully"

This has been installed in a GPO in Computer Configuration / Windows Configuration / Scripts (Start / Shutdown) / Start

I can run this in the Powershell ISE if I log in, and the text file is created or updated, but using it as a GPO startup script has no discernible effect.

I ran gpresult / h To determine if the policy is being applied (s):
enter the description of the image here

I have also checked the system logs in Application and service logs / Microsoft / Windows / GroupPolicy / Operationalwhich reports a list of applicable group policy objects that my GPO script includes. It also reports the start of Scripts Extension processing and lists my GPO, and completes the processing, but does not report errors between these two points.

Then, it seems that my policy object is being applied, and that my workstation is making some attempt to process it. However, the file that you are supposed to create never appears.

Clearly I'm missing something, but what?

sql server: using Powershell, get the list of backup and verify in SAN

Using the dbatools below command, we obtain a backup history of all our instances

    Get-DbaBackupHistory -SqlInstance SqlInstance2014a

Once the backups are completed, the process copies them to SAN, which we verify using this command

dir "\ SQL Backups  2019  6" -Recurse -Filter * .bak -ErrorAction SilentlyContinue -Force | select LastWriteTime, Name | Where-Object {$ _. LastWriteTime -ge [DateTime]:: Now.AddDays (-2)}

I'm struggling to combine them, requires following

  • Make a backup of the list on the server and then look for them in san to verify that they were copied; send this by email.

How do I disable the "Try the new multiplatform PowerShell" message when Powershell is run after the last Windows update? [migrated]

Since the last update of Windows 10, when opening POwershell, the message "Try the new PowerShell platform https://aka.ms/pscore6" appears.

I'd like to disable that notification. Any ideas?

2010: Remove from a list of shared points with powershell

I have a web element where a user adds a comment in a multi-line text field. Originally it was configured as a rich text field, but I need to change it to plain text for reasons. When I did, all the comments added or

for the comment and I need to remove it massively using power shell to save me individually and I need to edit thousands of comments. Can you do this?
example of div in comments

For reference, this is SharePoint 2010.